SASInstitute SAS advanced programming - A00-202 Exam Practice Test
The following SAS program is submitted:
data temp;
array points{2,3}_temporary_;
run;
Which one of the following is the maximum number of elements that are stored?
data temp;
array points{2,3}_temporary_;
run;
Which one of the following is the maximum number of elements that are stored?
Correct Answer: B
Vote an answer
Given the following SAS data sets ONE and TWO:
ONE TWO
OBS COMMON X OBS COMMON Y
1 A 10 1 A 1
2 A 13 2 A 3
3 A 14 3 B 4
4 B 9 4 B 2
5 C 8 5 C 5
6 C 14
The following SAS DATA step is submitted: data combine; set one; set two; run; Which one of the following represents the data values stored in data set COMBINE?
ONE TWO
OBS COMMON X OBS COMMON Y
1 A 10 1 A 1
2 A 13 2 A 3
3 A 14 3 B 4
4 B 9 4 B 2
5 C 8 5 C 5
6 C 14
The following SAS DATA step is submitted: data combine; set one; set two; run; Which one of the following represents the data values stored in data set COMBINE?
Correct Answer: B
Vote an answer
The following are values of the variable STYLE from the SAS data set SASUSER.HOUSES:
SASUSERS.HOUSES OBS STYLE
1 RANCH 2 SPLIT 3 CONDO 4 TWOSTORY 5 RANCH 6 SPLIT 7 SPLIT
The following SAS program is submitted:
proc sql noprint; select distinct style into :styles separated by ' ' from sasuser.houses order by style;
quit;
Which one of the following is the value of the resulting macro variable?
SASUSERS.HOUSES OBS STYLE
1 RANCH 2 SPLIT 3 CONDO 4 TWOSTORY 5 RANCH 6 SPLIT 7 SPLIT
The following SAS program is submitted:
proc sql noprint; select distinct style into :styles separated by ' ' from sasuser.houses order by style;
quit;
Which one of the following is the value of the resulting macro variable?
Correct Answer: C
Vote an answer
Given the following SAS data set ONE:
ONE
NUM VAR
1 A
2 B
3 C
Which one of the following SQL programs deletes the SAS data set ONE?
ONE
NUM VAR
1 A
2 B
3 C
Which one of the following SQL programs deletes the SAS data set ONE?
Correct Answer: B
Vote an answer
The following SAS program is submitted:
%let var = chicago, 1;
data a;
var = 'new york, 2';
newvar = %scan(&var,2,%str());
run;
Which one of the following explains why the program fails to execute?
%let var = chicago, 1;
data a;
var = 'new york, 2';
newvar = %scan(&var,2,%str());
run;
Which one of the following explains why the program fails to execute?
Correct Answer: D
Vote an answer
The following SAS FORMAT procedure is submitted:
proc format lib = sasuser;
value tempc low < 0 = 'BELOW FREEZING'
0 < 5 = 'COLD'
5 < 10 = 'MILD'
10 < 15 = 'WARM'
15 high = 'HOT'; run;
How is the value 10 displayed when the format TEMPC is applied?
proc format lib = sasuser;
value tempc low < 0 = 'BELOW FREEZING'
0 < 5 = 'COLD'
5 < 10 = 'MILD'
10 < 15 = 'WARM'
15 high = 'HOT'; run;
How is the value 10 displayed when the format TEMPC is applied?
Correct Answer: D
Vote an answer
Consider the following SAS log:
229 data sasuser.ranch sasuser.condo / view = sasuser.ranch;
230 set sasuser.houses;
231 if style = 'RANCH' then output sasuser.ranch;
232 else if style = 'CONDO' then output sasuser.condo;
233 run;
NOTE: DATA STEP view saved on file SASUSER.RANCH.
NOTE: A stored DATA STEP view cannot run under a different operating system.
235 proc print data = sasuser.condo;
ERROR: File SASUSER.CONDO.DATA does not exist.
236 run;
NOTE: The SAS System stopped processing this step because of errors.
Which one of the following explains why the PRINT procedure fails?
229 data sasuser.ranch sasuser.condo / view = sasuser.ranch;
230 set sasuser.houses;
231 if style = 'RANCH' then output sasuser.ranch;
232 else if style = 'CONDO' then output sasuser.condo;
233 run;
NOTE: DATA STEP view saved on file SASUSER.RANCH.
NOTE: A stored DATA STEP view cannot run under a different operating system.
235 proc print data = sasuser.condo;
ERROR: File SASUSER.CONDO.DATA does not exist.
236 run;
NOTE: The SAS System stopped processing this step because of errors.
Which one of the following explains why the PRINT procedure fails?
Correct Answer: A
Vote an answer
Given the following SAS data set ONE:
ONE
COUNTRY CITY VISIT
USA BOSTON 10 UK LONDON 5
USA DALLAS 10
UK MARLOW 10
USA BOSTON 20
UK LONDON 15
USA DALLAS 10
The following SAS program is submitted:
proc sql;
select country, city, sum(visit) as TOTAL
from one
group by country, city
order by country, total desc;
quit;
Which one of the following reports is generated?
ONE
COUNTRY CITY VISIT
USA BOSTON 10 UK LONDON 5
USA DALLAS 10
UK MARLOW 10
USA BOSTON 20
UK LONDON 15
USA DALLAS 10
The following SAS program is submitted:
proc sql;
select country, city, sum(visit) as TOTAL
from one
group by country, city
order by country, total desc;
quit;
Which one of the following reports is generated?
Correct Answer: B
Vote an answer