Exam A00-211 All QuestionsBrowse all questions from this 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?

    Correct Answer: 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
Mandar77Option: A

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.

mhminkovOption: A

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.

KleinstoneOption: B

should this be B FA1?