164 libname perm 'C:\mysaslib';
NOTE: Libname PERM refers to the same physical library as TEMP.
NOTE: Libref PERM was successfully assigned as follows:
Physical Name: C:\mysaslib
165 data _null_;
166 set perm.jan_sales;
167 file 'C:\mysaslib\jan_sales_txt' dlm = ',';
168 put idnum sales_date : mmddyy10.;
NOTE: The file 'C:\mysaslib\jan_sales_txt' is:
RECFM=V,LRECL=256,File Size (bytes)=0,
NOTE: 5 records were written to the file 'C:\mysaslib\jan_sales_txt'.
The minimum record length was 16.
The maximum record length was 16.
NOTE: There were 5 observations read from the data set PERM.JAN_SALES.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.03 seconds
To create a comma delimited text file we need to use the DLM option to specify a delimiter in the file statement. The correct file statement is file 'C:\mysaslib\jan_sales_txt' dlm = ',';. To write sales_date in the format ddmmyy10 form, the correct format statement is put idnum sales_date : mmddyy10.; so option B is correct.
The following contents are written in the output file:
The one and only FREE resource for general SAS online training as well as study guides for the SAS Base Certification. My goal is to create the SAS Certification prep guide that I never found but always wanted. This should also be a place to come if you are new to the language but are simply looking for online SAS training.