SAS Certified Base Programmer 123 Questions (66)
The following SAS program is submitted:
libnamesasdata 'SAS-data-library'; data test; set sasdata.chemists (keep = job_code); if job_code = 'chem3' then description = 'Senior Chemist'; run;
The variable JOB_CODE is a character variable with a length of 6 bytes.
Which one of the following is the length of the variable DESCRIPTION in the output data set?
A. 6 bytes
B. 8 bytes
C. 14 bytes
D. 200 bytes
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
SAS Certified Base Programmer 123 Questions (64)
The following SAS DATA step is submitted:
data work.accountting; set work.department; length jobcode$ 12; run;
The WORK.DEPARTMENT SAS data set contains a character variable named JOBCODE with a length of 5.
Which one of the following is the length of the variable JOBCODE in the output data set?
A. 5
B. 8
C. 12
D. The length can not be determined as the program fails to execute due to errors.
SAS Certified Base Programmer 123 Questions (63)
Which one of the following SAS statements renames two variables?
A.
set work.dept1
work.dept2(rename = (jcode = jobcode) (sal = salary));
B.
set work.dept1
work.dept2(rename = (jcode = jobcode sal = salary));
C.
set work.dept1
work.dept2(rename = jcode = jobcode sal = salary);
D.
set work.dept1
work.dept2(rename = (jcode jobcode) (sal salary));
SAS Certified Base Programmer 123 Questions (62)
The following SAS program is submitted:
data work.company; set work.dept1(keep = jobcode) work.dept2(rename = (jcode = jobcode)); run;
Which one of the following is the result?
A. The variable JCODE is written to the output data set.
B. The variable JOBCODE is written to the output data set.
C. Neither variable JCODE nor JOBCODE is written to the output data set.
D. The program fails to execute due to errors.