A00-211 Exam QuestionsBrowse all questions from this exam

A00-211 Exam - Question 45


The following SAS program is submitted:

data work.staff;

JobCategory = 'FA';

JobLevel = '1';

JobCategory = JobCategory || JobLevel;

run;

Which one of the following is the value of the variable JOBCATEGORY in the output data set?

Show Answer
Correct Answer: A,B

The given program assigns 'FA' to JobCategory and '1' to JobLevel, then concatenates JobCategory and JobLevel using the concatenation operator (||) to derive the value of JobCategory again. Hence, the resulting value of JobCategory will be 'FA1'.

Discussion

3 comments
Sign in to comment
KleinstoneOption: B
Jan 18, 2021

should this be B FA1?

mhminkovOption: A
Jun 3, 2021

no, given answer A is correct, because the length of the variable is defined as 2 with this line: JobCategory = 'FA'; The last line is redefining the value of the same variable (there is no new variable), but the length can not be changed and the new value FA1 is truncated and remains as FA.

Mandar77Option: A
Jun 24, 2022

Answer A is correct. When program complies, SAS created PDV and column length of Job description is 2 as per assignment value in program. It wont change once PDV is defined.