SAS Certified Base Programmer 123 Questions (121)
The contents of the raw data file NAMENUM are listed below:
----|----10---|----20---|----30 Joe xx
The following SAS program is submitted:
data test; infile'namenum'; input name $ number; run;
Which one of the following is the value of the NUMBER variable?
A. xx
B. Joe
C. . (missing numeric value)
D. The value can not be determined as the program fails to execute due to errors.
SAS Certified Base Programmer 123 Questions (120)
The contents of the raw data file AMOUNT are listed below:
----|----10---|----20---|----30 $1,234
The following SAS program is submitted:
data test; infile'amount'; input @1 salary 6.; run;
Which one of the following is the value of the SALARY variable?
A. 1234
B. 1,234
C. $1,234
D. . (missing numeric value)
SAS Certified Base Programmer 123 Questions (119)
Which one of the following statements is true regarding the SAS automatic _ERROR_ variable?
A. The _ERROR_ variable contains the values ‘ON’ or ‘OFF’.
B. The _ERROR_ variable contains the values ‘TRUE’ or ‘FALSE’.
C. The _ERROR_ variable is automatically stored in the resulting SAS data set.
D. The _ERROR_ variable can be used in expressions or calculations in the DATA step.
SAS Certified Base Programmer 123 Questions (118)
Which one of the following is true when SAS encounters a data error in a DATA step?
A. The DATA step stops executing at the point of the error, and no SAS data set is created.
B. A note is written to the SAS log explaining the error, and the DATA step continues to execute.
C. A note appears in the SAS log that the incorrect data record was saved to a separate SAS file for further examination.
D. The DATA step stops executing at the point of the error, and the resulting DATA set contains observations up to that point.
SAS Certified Base Programmer 123 Questions (117)
The following SAS program is submitted:
data work.totalsales (keep=monthsales{12}); set work.monthlysales (keep=year product sales); array monthsales {12}; do i=1 to 12; monthsales{i}=sales; end; run;
The data set named WORK.MONTHLYSALES has one observation per month for each of five years for a total of 60 observations.
Which one of the following is the result of the above program?
A. The program fails execution due to data errors.
B. The program fails execution due to syntax errors.
C. The program executes with warnings and creates the WORK.TOTALSALES data set.
D. The program executes without errors or warnings and creates the WORK.TOTALSALES data set.