By admin | September 29, 2009

SAS Certified Base Programmer 123 Questions (91)

The following SAS program is submitted:

proc report data = work.houses nowd;
    column style price;
    where prices <100000;
    <insert DEFINE statements here>
    title;
run;

Exhibit: the output from the REPORT procedure.

style     price
CONDO     80,050
          79,350
RANCH     64,000
          86,650
          89,100
          34,550
SPLIT     65,850
          94,450
          73,650
TWOSTORY  55,850
          69,250

Assume permanent variable labels have been assigned.
Which one of the following completes the program and produces the output displayed in the exhibit?

A.
define style / display width = 9;
define price / sum format = comma9. width = 10;

B.
define style / width = 9;
define price / sum format = comma9. width = 10;

C.
define style / group width = 9;
define price / sum format = comma9. width = 10;

D.
define style / order width = 9;
define price / sum format = comma9. width = 10;

By admin | September 29, 2009

SAS Certified Base Programmer 123 Questions (90)

A realtor has two customers. One customer wants to view a list of homes selling for less than $60,000. The other customer wants to view a list of homes selling for greater than $100,000. Assuming the PRICE variable is numeric, which one of the following PRINT procedure steps will select all desired observations?

A.

proc print data = sasuser.houses;
where price lt 60000;
where price gt 100000;
run;

B.

proc print data = sasuser.houses;
where price lt 60000 or price gt 100000;
run;

C.

proc print data = sasuser.houses;
where price lt 60000 and price gt 100000;
run;

D.

proc print data = sasuser.houses;
where price lt 60000 or where price gt 100000;
run;

By admin | September 29, 2009

SAS Certified Base Programmer 123 Questions (89)

The value 110700 is stored in a numeric variable.
Which one of the following SAS formats is used to display the value as $110,700.00 in a report?

A. comma8.2
B. comma11.2
C. dollar8.2
D. dollar11.2

By admin | September 28, 2009

SAS Certified Base Programmer 123 Questions (88)

The SAS data set SASUSER.HOUSES contains a variable PRICE which has been assigned a permanent label of “Asking Price”. Which one of the following SAS programs temporarily replaces the label “Asking Price” with the label “Sale Price” in the output?

A.

proc print data = sasuser.houses;
    label price = "sale Price";
run;

B.

proc print data = sasuser.houses label;
    label price "Sale Price";
run;

C.

proc print data = sasuser.houses label;
    label price = "Sale Price";
run;

D.

proc print data = sasuser.houses label = "Sale Price";
run;

By admin | September 28, 2009

SAS Certified Base Programmer 123 Questions (87)

The SAS data set BANKS is listed below:

BANKS

name           rate
FirstCapital   0.0718
DirectBank     0.0721
VirtualDirect  0.0728

The following SAS program is submitted:

data newbank;
    do year = 1 to 3;
        set banks;
        capital + 5000;
    end;
run;

Which one of the following represents how many observations and variables will exist in the SAS data set NEWBANK?

A. 0 observations and 0 variables
B. 1 observations and 4 variables
C. 3 observations and 3 variables
D. 9 observations and 2 variables