set SASUSER.HIGHWAY; select(Status);
%do i=1 %to &Count;
when(\ %end;
otherwise; end; run; %mend;
%SPLIT
What macro variable reference completes the program to create the WORK.NOT and WORK.SERIOUS data sets?
A.
&Status&i
B.
&&Status&i
C.
&Status&Count
D.
&&Status&Count
Item 24 of 63 Mark item for review
The following SAS program is submitted:
%let Num1=7; %let Num2=3;
%let Result=%eval(&Num1/&Num2); %put &Result;
What is the value of the macro variable Result when the %PUT statement executes?
A. 2.3
B. 2
C.
. (missing value)
D.
2.33333333333333
Item 25 of 63 Mark item for review
Given the SAS data set SASUSER.HIGHWAY:
Steering Seatbelt Speed Status Count -------- -------- ----- ------- ----- absent No 0-29 serious 31 absent No 0-29 not 1419 absent No 30-49 serious 191 absent no 30-49 not 2004 absent no 50+ serious 216
The following SAS program is submitted:
%macro HIGHWAY(Belt=no);
proc print data=SASUSER.HIGHWAY; where Seatbelt=\ run; %mend;
%HIGHWAY(Belt=No)
How many observations appear in the generated report?
A. 0
B. 2
C. 3
D. 5
Item 26 of 63 Mark item for review
Given the following SAS data sets:
WORK.VISIT1 WORK.VISIT2
Id Expense Id Cost --- ------- --- ---- 001 500 001 300 001 400 002 600 003 350
The following result set was summarized and consolidated using the SQL procedure:
Id Cost --- ---- 001 300 001 900 002 600 003 350
Which of the following SQL statements was most likely used to generate this result?
A. select
Id,
sum(Expense) label='COST' from WORK.VISIT1 group by 1 union all select Id,
sum(Cost) from WORK.VISIT2 group by 1 order by 1,2 ;
B. select id,
sum(expense) as COST from
WORK.VISIT1(rename=(Expense=Cost)), WORK.VISIT2
where VISIT1.Id=VISIT2.Id group by Id order by Id, Cost ;
C. select
VISIT1.Id,
sum(Cost) as Cost from
WORK.VISIT1(rename=(Expense=Cost)), WORK.VISIT2
where VISIT1.Id=VISIT2.Id group by Id order by Id, Cost ;
D. select Id,
sum(Expense) as Cost from WORK.VISIT1 group by Id outer union corr select Id,
sum(Cost) from WORK.VISIT2 group by Id order by 1,2 ;
Item 27 of 63 Mark item for review
Given the SAS data sets:
WORK.FIRST WORK.SECOND
Common X Common Y ------ -- ------ -- A 10 A 1 A 13 A 3 A 14 B 4 B 9 B 2
The following SAS program is submitted:
data WORK.COMBINE; set WORK.FIRST; set WORK.SECOND; run;
What data values are stored in data set WORK.COMBINE?
A.
Common X Y ------ -- -- A 10 1