SAS Certified Base Programmer 123 Questions (31)
The contents of the SAS data set PERM.JAN_SALES are listed below:
VARIABLE NAME TYPE idnum character variable sales_date numeric date value
A comma delimited raw data file needs to be created from the PERM.JAN_SALES data set. The SALES_DATE values need to be in a MMDDYY10 form.
Which one of the following SAS DATA steps correctly creates this raw data file?
A.
libname perm 'SAS-data-library';
data_null_;
set perm.jan_sales;
file 'file-specification' dsd = ',';
put idnum sales_date : mmddyy 10.;
run;
B.
libname perm 'SAS-data-library';
data_null_;
set perm.jan_sales;
file 'file-specification' dlm = ',';
put idnum sales_date : mmddyy 10.;
run;
C.
libname perm 'SAS-data-library';
data_null_;
set perm.jan_sales;
file 'file-specification';
put idnum sales_date : mmddyy 10. dlm = ',';
run;
D.
libname perm 'SAS-data-library';
data_null_;
set perm.jan_sales;
file 'file-specification';
put idnum sales_date : mmddyy 10. dsd = ',';
run;
SAS Certified Base Programmer 123 Questions (30)
A raw data record is shown below:
07Jan2002
Which one of the following informats would read this value and store it as a SAS date value?
A. date9.
B. ddmonyy9.
C. ddMMMyy9.
D. ddmmmyyyy9.
SAS Certified Base Programmer 123 Questions (29)
The following SAS program is submitted:
libnametemp 'SAS-data-library';
data work.new;
set temp.jobs;
format newdate mmddyy10.;
qdate= qtr(newdate);
ddate= weekday(newdate);
run;
proc print data = work.new;
run;
The variable NEWDATE contains the SAS date value for April 15, 2000.
What output is produced if April 15, 2000 falls on a Saturday?
A.
| Obs | newdate | qdate | ddate |
| 1 | APR152000 | 2 | 6 |
B.
| Obs | newdate | qdate | ddate |
| 1 | 04/15/2000 | 2 | 6 |
C.
| Obs | newdate | qdate | ddate |
| 1 | APR152000 | 2 | 7 |
D.
| Obs | newdate | qdate | ddate |
| 1 | 04/15/2000 | 2 | 7 |
SAS Certified Base Programmer 123 Questions (28)
The following SAS program is submitted:
data work.report;
set work.sales_info;
if qtr(sales_date) ge 3;
run;
The SAS data set WORK.SALES_INFO has one observation for each month in the year 2000 and the variable SALES_DATE which contains a SAS date value for each of the twelve months.
How many of the original twelve observations in WORK.SALES_INFO are written to the WORK.REPORT data set?
A. 2
B. 3
C. 6
D. 9
SAS Certified Base Programmer 123 Questions (27)
The following SAS program is submitted:
data revenue;
set year_1;
var1 = mdy(1,15,1960);
run;
Which one of the following values does the variable named VAR1 contain?
A. 14
B. 15
C. 1151960
D. ‘1/15/1960’