SAS Base Programming for SAS 9 — Question 57
Which statement specifies that records 1 through 10 are to be read from the raw data file customer.txt?
Answer options
- A. infile 'customer.txt' eof=10;
- B. infile 'customer.txt' obs=10;
- C. infile 'customer.txt' obs=10;
- D. infile 'customer.txt' obs=1-10;
Correct answer: D
Explanation
The correct answer is D because it uses the syntax 'obs=1-10' to specify the exact range of records to read. Options A, B, and C do not correctly define the range; option A uses 'eof' which signifies end of file, while options B and C only limit the total number of records to 10 without specifying the beginning point.