166 data stock;
167 infile 'C:\mysaslib\furniture' dsd;
168 input item1 $ item2 $ item3 $;
NOTE: The infile 'C:\mysaslib\furniture' is:
RECFM=V,LRECL=256,File Size (bytes)=33,
NOTE: 2 records were read from the infile 'C:\mysaslib\furniture'.
The minimum record length was 12.
The maximum record length was 17.
NOTE: The data set WORK.STOCK has 2 observations and 3 variables.
NOTE: DATA statement used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds
The statement infile 'furniture' dsd; is using the dsd option. This DSD (Delimiter-Sensitive Data) option for the INFILE statement does three things for you. First, it ignores delimiters in data values enclosed in quotation marks. Second, it does not read quotation marks as part of the data value. Third, it treats two delimiters in a row as a missing value. The DSD option assumes that the delimiter is a comma.
When SAS reads the second record from the file, item1 is set to 'chair'; item2 is set to 'couch'; item3 is set to 'table' and these are written to the output SAS data set. For the second observation, the value of item2 will be 'couch' so option A is correct.
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.