*---+----1----+----2----+----3----+----4----+----5----+----6----+---;
*** c02s4d01 ***;
dm "output;clear;log;clear";
Libname Course2 "C:\_SasCourse2006\Course2\SAS_Data";
ods csvall file='C:\_SasCourse2006\Course2\SAS_Data\export.dat';
footnote1 'data: Course2.maysales';
proc print noobs data=Course2.maysales;
format ListDate
SellDate date9.;
run;
ods csvall close;
*---+----1----+----2----+----3----+----4----+----5----+----6----+---;
*** c02s4d02 ***;
data _null_;
set Course2.maysales;
file 'export.dat'; * PC and Unix;
*file '.Course2.rawdata(export)'; * z/OS;
put Description
ListDate : date9.
SellDate : date9.
SellPrice;
run;
proc fslist fileref='export.dat'; * PC and Unix;
*proc fslist fileref='.Course2.rawdata(export)'; * z/OS;
run;
proc fslist fileref='C:\_SasCourse2006\Course2\SAS_Data\export.dat';
run;
*---+----1----+----2----+----3----+----4----+----5----+----6----+---;
*** c02s4d03 ***;
data _null_;
set Course2.maysales;
file 'export.dat'; * PC and Unix;
*file '.Course2.rawdata(export)'; * z/OS;
if _N_=1 then
put 'Description ListDate SellDate SellPrice';
put Description
ListDate : date9.
SellDate : date9.
SellPrice;
run;
proc fslist fileref='export.dat'; * PC and Unix;
*proc fslist fileref='.Course2.rawdata(export)'; * z/OS;
run;
*---+----1----+----2----+----3----+----4----+----5----+----6----+---;
*** c02s4d04 ***;
data _null_;
set Course2.maysales end=IsLast;
file 'export.dat'; * PC and Unix;
*file '.Course2.rawdata(export)'; * z/OS;
if _N_=1 then
put 'Description ListDate SellDate SellPrice';
put Description
ListDate : date9.
SellDate : date9.
SellPrice;
if IsLast=1 then
put 'Data: Course2.MAYSALES';
run;
proc fslist fileref='export.dat'; * PC and Unix;
*proc fslist fileref='.Course2.rawdata(export)'; * z/OS;
run;
*---+----1----+----2----+----3----+----4----+----5----+----6----+---;
*** c02s4d05 ***;
data _null_;
set Course2.maysales end=IsLast;
file 'export.dat' dlm=','; * PC and Unix;
*file '.Course2.rawdata(export)'; * z/OS;
if _N_=1 then
put 'Description,ListDate,SellDate,SellPrice';
put Description
ListDate : date9.
SellDate : date9.
SellPrice;
if IsLast=1 then
put 'Data: Course2.MAYSALES';
run;
proc fslist fileref='export.dat'; * PC and Unix;
*proc fslist fileref='.Course2.rawdata(export)'; * z/OS;
run;