Which one of the following is an advantage of creating and using a SAS DATA step view?
Show answer and explanation
Correct answer: B
A00-202 Real Exam Questions
130 questions available · Page 1 of 13
Updated Exam DumpsVerified AnswersPass Guarantee
Which one of the following is an advantage of creating and using a SAS DATA step view?
Correct answer: B
The following SAS program is submitted:
options yearcutoff = 1950;
%macro y2kopt(date);
%if &date >= 14610 %then %do;
options yearcutoff = 2000;
%end;
%else %do;
options yearcutoff = 1900;
%end;
%mend;
data _null_ ;
date = "01jan2000"d;
call symput("date",left(date));
run;
%y2kopt(&date)
The SAS date for January 1, 2000 is 14610 and the SAS system option for YEARCUTOFF is set to 1920 prior to submitting the above program.
Which one of the following is the value of YEARCUTOFF when the macro finishes execution?
Correct answer: D
Which one of the following options displays the value of a macro variable in the SAS log?
Correct answer: D
The DICTIONARY.MACROS table stores information about which of the following?
Correct answer: C
Given the following SAS data set ONE:
ONE
LEVEL AGE
--------------------
1 10
2 20
3 20
2 10
1 10
2 30
3 10
2 20
3 30
1 10
The following SAS program is submitted:
proc sql;
select level, max(age) as MAX from one group by level
having max(age) > (select avg(age) from one);
quit;
Which one of the following reports is generated?
Correct answer: D
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?
Correct answer: D
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?
Correct answer: C
The following SAS program is submitted:
%macro test(var);
%let jobs = BLACKSMITH WORDSMITH SWORDSMITH;
%let type = %index(&jobs,&var);
%mend;
%test(SMITH)
Which one of the following is the resulting value of the macro variable TYPE?
Correct answer: C
Which one of the following is the purpose of the IDXNAME= data set option?
Correct answer: C
Given the following SAS data sets ONE and TWO:
ONE TWO
NUM COUNTRY NUM CITY
---------------------- ---------------------
1 CANADA 3 BERLIN
2 FRANCE 5 TOKYO
3 GERMANY 4 BELGIUM
5 JAPAN
The following SAS program is submitted:
proc sql;
select country from one where not exists
(select * from two where one.num = two.num);
quit;
Which one of the following reports is generated?
Correct answer: C