By admin | October 28, 2009

SAS Certified Adv Programmer 130 Questions (8)

The following SAS code is submitted:

%macro houses(dsn = houses,sub = RANCH);
data &dsn;
    set sasuser.houses; if style = "&sub";
run;
%mend;

%houses(sub = SPLIT)
%houses(dsn = ranch)
%houses(sub = TWOSTORY)

Which one of the following is the value of the automatic macro variable SYSLAST?

A. work.ranch
B. work.houses
C. WORK.RANCH
D. WORK.HOUSES

By admin | October 28, 2009

SAS Certified Adv Programmer 130 Questions (7)

Which one of the following programs contains a syntax error?

A.

proc sql;
    select product.*, cost.unitcost, sales .quantity
        from product p, cost c, sales s
        where p.item = c.item and p.item = s.item;
quit;

B.

proc sql;
    select product.*, cost.unitcost, sales.quantity
        from product, cost,
        sales where product.item = cost.item and product.item = sales.item;
quit;

C.

proc sql;
    select p.*, c.unitcost, s.quantity
        from product as p, cost as c, sales as s
        where p.item = c.item and p.item = s.item;
quit;

D.

proc sql;
    select p.*, c.unitcost, s.quantity
        from product, cost, sales
        where product.item = cost.item and product.item = sales.item;
quit; 

By admin | October 28, 2009

SAS Certified Adv Programmer 130 Questions (6)

The following SAS program is submitted:

data one;
    do i = ito 10;
        ptobs = ceil(ranuni(0) * totobs);
        set temp point = ptobs nobs = totobs;
        output;
    end;
    stop;
run;

The SAS data set TEMP contains 2,500,000 observations. Which one of the following represents the possible values for PTOBS?

A. any integer between 1 and 10
B. any real number between 0 and 1
C. any integer between 1 and 2,500,000
D. any real number between 1 and 2,500,000

By admin | October 22, 2009

SAS Certified Adv Programmer 130 Questions (5)

The following SAS program is submitted:

proc sort data = sales tagsort;
    by month year; 
run;

Which of the following resource(s) is the TAGSORT option reducing?

A. I/O usage only
B. CPU usage only
C. I/O and CPU usage
D. temporary disk usage

By admin | October 22, 2009

SAS Certified Adv Programmer 130 Questions (4)

Given the following SAS data set ONE:

ONE

REP COST
SMITH 200
SMITH 400
JONES 100
SMITH 600
JONES 100
JONES 200
JONES 400
SMITH 800
JONES 100
JONES 300

The following SAS program is submitted: proc sql;

select rep, avg(cost) as AVERAGE from one 
    group by rep 
    having avg(cost) > (select avg(cost) from one);
quit;

Which one of the following reports is generated?

A.
REP AVERAGE
JONES 200

B.
REP AVERAGE
JONES 320

C.
REP AVERAGE
SMITH 320

D.
REP AVERAGE
SMITH 500