Exam A00-211 All QuestionsBrowse all questions from this exam
Question 3

The following SAS program is submitted:

data work.accounting;

set work.dept1 work.dept2;

jobcode = FA1;

length jobcode $ 8;

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. What is the length of the variable JOBCODE in the output data set?

    Correct Answer: D

    In the given SAS program, the LENGTH statement sets the length of the variable JOBCODE to 8 bytes. The LENGTH statement in SAS overrides the lengths specified in the input data sets (WORK.DEPT1 and WORK.DEPT2). Because the LENGTH statement is executed before any data step processing, the length of JOBCODE in the output data set will be 8.

Discussion
Mouni_18Option: D

Yes I did It. It is 8 only not 5.

kurimiOption: D

I think 8 is correct. Why is 5 correct answer?