Hi. If you want a CSV file, you can just use PROC PRINT, for example ...
ods listing close; ods results off; ods csv file='z:\class.csv';
proc print data=sashelp.class noobs; run;
ods csv close; ods listing; ods results;
partial view of CLASS.CSV ...
"Name","Sex","Age","Height","Weight" "Alfred","M",14,69.0,112.5 "Alice","F",13,56.5,84.0 "Barbara","F",13,65.3,98.0 "Carol","F",14,62.8,102.5 "Henry","M",14,63.5,102.5
If you just want a file with fixed with output for all variables with the numbers right justified ...
* Z format adds leading zeroes;
data _null_; file 'z:\fixed.txt'; set CVR_no_incl; put country z2. Rcd_type z1. char_dealer z10. char_Inv_nbr z7. char_Doc_type z3. char_Doc_date z8. char_Outstanding_amount z13. char_Credit_limit z13. ;
run;
For example ...
* rounds height and weight, adds leading zeroes; data _null_; file 'z:\class.txt'; set sashelp.class; put age z5. height z5. weight z5. ; run;
partial view of CLASS.TXT ...
000140006900113 000130005700084 000130006500098 000140006300103 000140006400103
... View more