Question 58 :
The following SAS program is submitted and reads 100 records from a raw data file:
data work.total;
infile 'file-specification' end = eof;
input name $ salary;
totsal + salary;
run;
Which one of the following IF statements writes the last observation to the output data set?
- if end = 0;
- Get all Questions and Answer from here
- You need to have paid subscription to access all questions
- Thanks for considering SAS Certification Material
Correct Answer : 4
Exp : end is sas keyword which will become true when SAS reads last record of a dataset. This value you cannot use directly in your program, so we create a alias name eof (end of
file), but you can name it anything.
You can access to full explanation to question and answer from this page.