SAS Certified Base Programmer 123 Questions (11)
The following SAS program is submitted and reads 100 records from a raw data file:
data work.total; infile 'file-specification' end = eof; input name $ salary; totsal+ salary; <insert IF statement here> run;
Which one of the following IF statements writes the last observation to the output data set?
A. if end = 0;
B. if eof = 0;
C. if end = 1;
D. if eof = 1;
SAS Certified Base Programmer 123 Questions (10)
The following SAS program is submitted:
libname rawdata1 'location of SAS data library'; filename rawdata2 'location of raw data file'; data work.testdata; infile <insert item here> input sales1 salse2; run;
Which one of the following is needed to complete the program correctly?
A. rawdata1
B. rawdata2
C. ‘rawdata1’
D. ‘rawdata2’
SAS Certified Base Programmer 123 Questions (9)
A raw data record is listed below:
----|----10---|----20---|----30 son,Travis,
The following output is desired:
relation firstname son Travis
Which one of the following SAS programs reads the data correctly?
A.
data family / dlm = ','; infile 'file-specification'; input relation $ firstname $; run;
B.
option dlm = ','; data family; infile 'file-specification'; input relation $ firstname $; run;
C.
data family; infile 'file-specification' option dlm = ','; input relation $ firstname $; run;
D.
data family; infile 'file-specification'; input relation $ firstname $ / dlm = ','; run;
SAS Certified Base Programmer 123 Questions (8)
The contents of the raw data file TYPECOLOR are listed below:
----|----10---|----20---|----30 daisyyellow
The following SAS program is submitted:
data flowers; infile'typecolor'; input type $ 1-5 +1 color $; run;
Which one of the following represents the values of the variables TYPE and COLOR?
A. type color
daisy yellow
B. type color
daisy ellow
C. type color
daisyyellow (missing character value)
D. No values are stored as the program fails to execute due to syntax errors.
SAS Certified Base Programmer 123 Questions (7)
The contents of the raw data file PRODUCT are listed below:
----|----10---|----20---|----30 24613 $25.31
The following SAS program is submitted:
data inventory; infile 'product'; input idnum 5. @10 price; run;
Which one of the following is the value of the PRICE variable?
A. 25.31
B. $25.31
C. . (missing numeric value)
D. No value is stored as the program fails to execute due to errors.