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?
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?
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'.
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.
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.
should this be B FA1?