Skip to main content

A00-202 Real Exam Questions

SAS Advanced Programming

130 questions available · Page 1 of 13

Updated Exam DumpsVerified AnswersPass Guarantee

Get Complete Exam Dumps
Question 1 Single choice

Which one of the following is an advantage of creating and using a SAS DATA step view?

  1. A

    It can store an index.

  2. B

    It always accesses the most current data.

  3. C

    It works quickly through multiple passes of the data.

  4. D

    It is useful when the underlying data file structure changes.

Show answer and explanation

Correct answer: B

Question 2 Single choice

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?

  1. A

    1900

  2. B

    1920

  3. C

    1950

  4. D

    2000

Show answer and explanation

Correct answer: D

Question 3 Single choice

Which one of the following options displays the value of a macro variable in the SAS log?

  1. A

    MACRO

  2. B

    SOURCE

  3. C

    SOURCE2

  4. D

    SYMBOLGEN

Show answer and explanation

Correct answer: D

Question 4 Single choice

The DICTIONARY.MACROS table stores information about which of the following?

  1. A

    user defined macro variables only

  2. B

    system defined macro variables only

  3. C

    both user and system defined macro variables

  4. D

    macros stored in the autocall macro library only

Show answer and explanation

Correct answer: C

Question 5 Single choice

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?

  1. A

    LEVEL AGE
    -----------------
    2 20
    3 20

  2. B

    LEVEL AGE
    -------------------
    2 30
    3 30

  3. C

    LEVEL MAX
    ------------------
    2 20
    3 30

  4. D

    LEVEL MAX
    ---------------------
    2 30
    3 30

Show answer and explanation

Correct answer: D

Question 6 Single choice

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?

  1. A

    SASUSER.CONDO is a stored DATA step program.

  2. B

    A SAS data file and SAS data view cannot be created in the same DATA step.

  3. C

    A second VIEW=SASUSER.CONDO option was omitted on the DATA statement.

  4. D

    The view SASUSER.RANCH must be processed before SASUSER.CONDO is created.

Show answer and explanation

Correct answer: D

Question 7 Single choice

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?

  1. A

    OBS COMMON X Y
    -----------------------------------
    1 A 10 1
    2 A 13 3
    3 A 14 3
    4 B 9 4
    5 B 9 2
    6 C 8 5
    7 C 14 5

  2. B

    OBS COMMON X Y
    ----------------------------------
    1 A 10 1
    2 A 13 3
    3 B 9 4
    4 C 8 5

  3. C

    OBS COMMON X Y
    --------------------------------
    1 A 10 1
    2 A 13 3
    3 B 14 4
    4 B 9 2
    5 C 8 5

  4. D

    OBS COMMON X Y
    --------------------------------
    1 A 10 1
    2 A 13 1
    3 A 14 1
    4 A 10 3
    5 A 13 3
    6 A 14 3
    7 B 9 4
    8 B 9 2
    9 C 8 5
    10 C 14 5

Show answer and explanation

Correct answer: C

Question 8 Single choice

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?

  1. A

    0

  2. B

    3

  3. C

    6

  4. D

    null

Show answer and explanation

Correct answer: C

Question 9 Single choice

Which one of the following is the purpose of the IDXNAME= data set option?

  1. A

    It instructs SAS to name and store a specific index.

  2. B

    It instructs SAS to store an index in a particular location.

  3. C

    It instructs SAS to use a specific index for WHERE processing.

  4. D

    It instructs SAS to use any available index for WHERE processing.

Show answer and explanation

Correct answer: C

Question 10 Single choice

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?

  1. A

    COUNTRY
    --------------GERMANY

    JAPAN

  2. B

    COUNTRY
    ----------------FRANCE
    BELGIUM

  3. C

    COUNTRY
    ----------------CANADA
    FRANCE
    BELGIUM

  4. D

    COUNTRY
    -------------CANADA
    FRANCE
    GERMANY

Show answer and explanation

Correct answer: C