By admin | September 8, 2009

SAS Certified Base Programmer 123 Questions (26)

The following SAS program is submitted:

data work.new;
    mon= 3;
    day = 23;
    year =2000;
    date = mdy(mon,day,year);
run;

Which one of the following is the value of the DATE variable?

A. a character string with the value ’23mar2000′
B. a character string with the value ’03/23/2000′
C. a numeric value of 14692, which represents the SAS date value for March 23, 2000
D. a numeric value of 3232000, which represents the SAS date value for March 23, 2000

By admin | September 8, 2009

SAS Certified Base Programmer 123 Questions (25)

The following SAS DATA step executes on Monday, April 25, 2000:

data newstaff;
    set staff;
    start_date=today();
run;

Which one of the following is the value of the variable START_DATE in the output data set?

A. a character string with the value ’04/25/2000′
B. a character string with the value ‘Monday, April 25, 2000’
C. the numeric value 14725, representing the SAS date for April 25, 2000
D. the numeric value 04252000, representing the SAS date for April 25, 2000

By admin | September 8, 2009

SAS Certified Base Programmer 123 Questions (24)

The following SAS DATA step is submitted:

data sasdata.atlanta
     sasdata.boston
     work.portland
     work.phoenix;
    set company.prdsales;
    if region = 'NE' then output bostan;
    if region = 'SE' then output atlanta;
    if region = 'SW' then output phoenix;
    if region = 'NW' then output portland;
run;

Which one of the following is true regarding the output data sets?

A. No library references are required.
B. The data sets listed on all the IF statements require a library reference.
C. The data sets listed in the last two IF statements require a library reference.
D. The data sets listed in the first two IF statements require a library reference.

By admin | September 4, 2009

SAS Certified Base Programmer 123 Questions (23)

Which one of the following SAS DATA steps saves the temporary data set named MYDATA as a permanent data set?

A.

libname sasdata 'SAS-data-library';
data sasdata.mydata;
copy mydata;
run;

B.

libname sasdata 'SAS-data-library';
data sasdata.mydata;
keep mydata;
run;

C.

libname sasdata 'SAS-data-library';
data sasdata.mydata;
save mydata;
run;

D.

libname sasdata 'SAS-data-library';
data sasdata.mydata;
set mydata;
run;

By admin | September 4, 2009

SAS Certified Base Programmer 123 Questions (22)

The following SAS DATA step is submitted:

libnametemp 'SAS-data-library';
data temp.report;
    set sasuser.houses;
    newvar= price * 1.04;
run;

Which one of the following statements is true regarding the program above?

A. The program is reading from a temporary data set and writing to a temporary data set.
B. The program is reading from a temporary data set and writing to a permanent data set.
C. The program is reading from a permanent data set and writing to a temporary data set.
D. The program is reading from a permanent data set and writing to a permanent data set.