A00-211 Exam QuestionsBrowse all questions from this exam

A00-211 Exam - Question 23


Given the SAS data set PEPM.STUDENTS:

PERM.STUDENTS NAME AGE -

--------- ------ Alfred 14

Alice13 -

Barbara13 -

Carol14 -

The following SAS program is submitted:

libname perm SAS data library;

data students;

set perm.students;

file file specification;

put name $15. @5 age 2.;

run;

What is written to the output raw data file?

Show Answer
Correct Answer: AB

In the SAS program provided, the PUT statement specifies that the 'name' field should be written with a width of 15 characters, followed by the 'age' field starting at position 5 with a width of 2 characters. This format will correctly line up the 'age' values in the columns, while the 'name' field will occupy the first 15 characters. Hence, the output will align the names to the left with 15 characters and the ages starting at the 5th position within these 15 characters. The resulting output will be lines that look like 'Alfred 14', 'Alice 13', 'Barbara 13', 'Carol 14'.

Discussion

1 comment
Sign in to comment
KleinstoneOption: B
Jan 9, 2021

first assignment fixes the length and the B is correct. Not C,