By admin | August 7, 2009

SAS Certified Base Programmer 50 Questions (31)

Which of the following statements is true when SAS encounters a syntax error in a DATA step?

a. The SAS log contains an explanation of the error.
b. The DATA step continues to execute and the resulting data set is complete.
c. The DATA step stops executing at the point of the error and the resulting data set contains observations up to that point.
d. A note appears in the SAS log indicating that the incorrect statement was saved to a SAS data set for further examination.

By admin | August 7, 2009

SAS Certified Base Programmer 50 Questions (30)

The descriptor and data portions of the Work.Salaries data set are shown below.

Variable Type Len Pos
---------------------
name     Char 8   0
salary   Char 8   16
status   Char 8   8



name      status salary
----------------------
Liz       S      15,600
Herman    S      26,700
Marty     S      35,000

The following SAS program is submitted:

proc print data=work.salaries;
    where salary<20000;
run;

What is displayed in the SAS log after the program is executed?

a. A NOTE indicating that 1 observation is read.
b. A NOTE indicating that 0 observations were read.
c. A WARNING indicating that character values have been converted to numeric values.
d. An ERROR indicating that the WHERE clause operator requires compatible variables.

By admin | August 7, 2009

SAS Certified Base Programmer 50 Questions (29)

A frequency report of the variable Jobcode in the Work.Actors data set is listed below.

Jobcode Frequency Percent Cumulative Frequency Cumulative Percent
Actor I 2 33.33 2 33.33
Actor II 2 33.33 4 66.67
Actor III 2 33.33 6 100.00
Frequency Missing = 1

The following SAS program is submitted:

data work.joblevels;
    set work.actors;
    if jobcode in ('Actor I', 'Actor II') then
        joblevel='Beginner';
    if jobcode='Actor III' then
        joblevel='Advanced';
    else joblevel='Unknown';
run;

Which of the following represents the possible values for the variable joblevel in the Work.Joblevels data set?

a. Advanced and Unknown only
b. Beginner and Advanced only
c. Beginner, Advanced, and Unknown
d. ” (missing character value)

By admin | August 7, 2009

SAS Certified Base Programmer 50 Questions (28)

The following SAS program is submitted:

ods html file='newfile.html';
proc print data=sasuser.houses;
run;
proc means data=sasuser.houses;
run;
proc freq data=sasuser.shoes;
run;
ods html close;
proc print data=sasuser.shoes;
run;

How many HTML files are created?

a. 1
b. 2
c. 3
d. 4

By admin | August 7, 2009

SAS Certified Base Programmer 50 Questions (27)

Which one of the following SAS REPORT procedure options controls how column headings are displayed over multiple lines?

a. SPACE=
b. SPLIT=
c. LABEL=
d. BREAK=