SAS: Import and Export Data

If you want to import data into SAS with SAS Code you can use the following structure:

data my_table;
infile “[Type in the full Path where to find the data]”
delimiter=‘,’
missover
dsd
lrecl
=32767
firstobs=2
;
length
first_field $ 24
;
input
first_field $
;
label
first_field = “first_field”
;
run;

If you want to export data you can use the following structure. If you need more detailed code you can use the procedure output in the LOG window.

proc export data=my_table
outfile=“[Type in the full Path where to find the data]”
dbms=dlm;
delimiter=‘|’;
run;    

Antwort schreiben