04-27-2015 12:35 PM
I'm going through the results of a practice exam with the following question:
Given the SAS data set PERM.STUDENTS:
PERM.STUDENTS NAME AGE
--------- ------ Alfred 14
The following SAS program is submitted:
libname perm ‘SAS data library’;
file ‘file specification’;
put name $15. @5 age 2.;
What is written to the output raw data file?
The correct response is listed below:
I think I understand the first two (i.e. Alfr14 and Alic13), but I'm not sure why the second answer shouldn't be Barb1 or Barb14 and the third Caro14.
Would someone mind explaining the answer and possibly correcting it if it is incorrect?
04-27-2015 12:48 PM
Barb13a because put first puts the name: Barbara then goes to column 5 (the @5) and prints the age of 13.
I suspect there's something odd about the actual values of name and age for the Carol14 that we can't see as we don't have the data set.
04-27-2015 01:41 PM
I did a web search and page SAS Base Certification: Base SAS 88 found this question but the response choice displayed was
note the difference from your post.