|
Translating a program is a SAS® function that makes it work about the same way in a different programming language. This is a simple routine to add into your program to write data to a comma delimited file for importing into a Microsoft Access or Excel table. The TRANSLATE function converts non-numeric fields for commas and replaces blank spaces.
|
data tableout (drop=n);
set carlo.ais;
array t(*) _character_;
do n=1 to dim(t);
t(n)=translate(t(n)," ",",");
end;
run;
filename fileout 'c:\tblout.csv';
proc export data=tableout dbms=csv
outfile=fileout replace;
run;
|
|