Reading from an External File
In this program, the
INPUT statement reads fields of data from an external file that is
referenced by the fileref Rawdata and creates 12 variables. For benchmarking
purposes, the DATA statement specifies the _NULL_ argument so that
you can measure resources used to read data isolated from resources
used to write data.
data _null_;
infile rawdata;
input @1 Customer_ID 12.
@13 Country $2.
@15 Gender $1.
@16 Personal_ID $15.
@31 Customer_Name $40.
@71 Customer_FirstName $20.
@91 Customer_LastName $30.
@121 Birth_Date date9.
@130 Customer_Address $45.
@175 Street_ID 12.
@199 Street_Number $8.
@207 Customer_Type_ID 8.;
run; |
Reading from a SAS Data Set
In this program, the
SET statement reads data directly from an existing SAS data set. As
in the previous program, the DATA statement uses _NULL_ instead of
naming a data set.
data _null_;
set retail.customer;
run; |