Data _null_;
set work.patients;
file 'c:\clinic\patientseferrals.dat';
put id 1-4 sex 6 age 8-9 height 11-12
weight 14-16 pulse 18-20;
run;
The keyword _NULL_ in the DATA statement enables you to use the power of the DATA step without actually creating a SAS data set. You use the FILE and PUT statements to write out the observations from a SAS data set to a raw data file. The FILE statement specifies the raw data file and the PUT statement descrives the lines to write to the raw data file. The filename and location specified in the FILE statement must be enclosed in quotation marks.