150 libname rawdata1 'C:\mysaslib\';
NOTE: Libname RAWDATA1 refers to the same physical library as TEMP.
NOTE: Libref RAWDATA1 was successfully assigned as follows:
Physical Name: C:\mysaslib\
151 filename rawdata2 'C:\mysaslib\SalesData';
152 data work.testdata;
153 infile rawdata2 ;
154 input sales1 sales2;
NOTE: The infile RAWDATA2 is:
RECFM=V,LRECL=256,File Size (bytes)=30,
NOTE: 4 records were read from the infile RAWDATA2.
The minimum record length was 3.
The maximum record length was 7.
NOTE: SAS went to a new line when INPUT statement reached past the end of a line.
NOTE: The data set WORK.TESTDATA has 3 observations and 2 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
Commentary: rawdata1 is a library reference created by the LIBNAME statement and this library reference cannot be used in INFILE statement. This rules out options A and C.
rawdata2 is a file reference created by the FILENAME statement. When using this file reference in the INFILE statement, there is no need to use single quotes. Thus, option B is correct.
NOTE: if single quotes are used (e.g. INFILE 'rawdata2' ;) then SAS will look for a file with name rawdata2.
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.