Want to pass your SAS Advanced Programming A00-202 exam in the very first attempt? Try Pass2lead! It is equally effective for both starters and IT professionals.
VCE
Which one of the following statements is true?
A. The WHERE statement can be executed conditionally as part of an IF statement.
B. The WHERE statement selects observations before they are brought into the PDV.
C. The subsetting IF statement works on observations before they are read into the PDV.
D. The WHERE and subsetting IF statements can be used interchangeably in all SAS programs.
Given the following SAS data sets ONE and TWO:
ONE TWO NUM CHAR1 NUM CHAR2
1 A1 2 X1
1 A2 2 X2
2 B1 3 Y
2 B2 5 V
4 D
The following SAS program is submitted creating the output table THREE:
proc sql;
create table three as
select one.num, char1, char2
from one, two
where one.num = two.num;
quit;
THREE
NUM CHAR1 CHAR2
2 B1 X1 2 B1 X2 2 B2 X1 2 B2 X2
Which one of the following DATA step programs creates an equivalent SAS data set THREE?
A. data three; merge one two; by num; run;
B. data three; set one; set two; by num; run;
C. data three;C.data three; merge one (in = in1) two (in = in2); by num;
if in1 and in2;
run;
D. data three;D.data three; set one; do i = 1 to numobs; set two(rename = (num = num2)) point = i nobs = numobs; if num2 = num then output; end; drop num2; run;
The SAS data set TEMP has the following distribution of values for variable A:
A Frequency 1 500,000 2 500,000 6 7,000,000 8 3,000
Which one of the following SAS programs requires the least CPU time to be processed?
A. data new; set temp; if a = 8 then b = 'Small '; else if a in(1, 2) then b = 'Medium'; else if a = 6 then b = 'Large'; run;
B. data new; set temp; if a in (1, 2) then b = 'Medium'; else if a = 8 then b = 'Small'; else if a = 6 then b = 'Large'; run;
C. data new; set temp; if a = 6 then b = 'Large '; else if a in (1, 2) then b = 'Medium'; else if a = 8 then b = 'Small'; run;
D. data new;D.data new; set temp; if a = 6 then b = 'Large '; if a in (1, 2) then b = 'Medium'; if a = 8 then b = 'Small'; run;