SAS Certified Base Programmer 123 Questions (65)
The following SAS program is submitted:
data work.accounting; set work.dept1 work.dept2; run;
A character variable named JOBCODE is contained in both the WORK.DEPT1 and WORK.DEPT2 SAS data sets. The variable JOBCODE has a length of 5 in the WORK.DEPT1 data set and a length of 7 in the WORK.DEPT2 data set.
Which one of the following is the length of the variable JOBCODE in the output data set?
A. 5
B. 7
C. 8
D. 12
Topics:
SAS Base Questions |
2 Comments »
A
You will also get a warning for multiple lengths for the variable named JOBCODE. You can resolve this by specifying length for JOBCODE using length statement before the set statement in above code.