09-12-2014 01:39 PM
infile 'employee.dat'; /* Assuming directory-based system */
input id $6. name $20. @30 locale $10.;
2. True or False...(Choose one)
The extesion of ".sas" is required for sas program files.
3.Which X variable has a value of 1 at the end of an input file?
A. END = X
B. OBS = X
C. EOF = X
D. LASTOBS = X
E. NOOBS = X
09-12-2014 02:14 PM
Are these the actual wording of questions from a SAS exam?
No wonder people hate standardized tests. There are so many unstated assumptions in these questions. And with multiple choice answers where can you write down which of myriad of possible questions you are going to assume they meant.
So in (1) they have posted a data step but it looks like they are really asking a question about the INPUT statement. The rest of the lines of code (including the totally unhelpful comment) are just red herrings.
(2) is straight forward, but of very limited value. Couldn't they have used this time on the exam to ask you an actual question about SAS?
(3) I would assume that by the word "file" they mean a data file that is being accessed by an INFILE statement. Rather than a program file or a data set.