By admin | September 21, 2009

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

2 comments | Add One

  1. admin - 09/21/2009 at 10:56 am

    A

  2. ritter james - 09/3/2012 at 4:07 am

    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.

Leave a Comment

Leave a Reply

Your email address will not be published.