Skip to main content

A00-211 Real Exam Questions

SAS Base Programming for SAS 9

270 questions available · Page 1 of 27

Updated Exam DumpsVerified AnswersPass Guarantee

Get Complete Exam Dumps
Question 1 Single choice

The following SAS program is submitted:

data stats;
set revenue;
array weekly{5} mon tue wed thu fri;

total = weekly{i} * .25;
output;
end;
run;

Which one of the following DO statements completes the program and processes the elements of the WEEKLY array?

  1. A

    do i = 1 to 5;

  2. B

    do weekly{i} = 1 to 5;

  3. C

    do i = mon tue wed thu fri;

  4. D

    A DO loop cannot be used because the variables referenced do not end in a digit.

Show answer and explanation

Correct answer: A

Question 2 Single choice

Given the raw data file `DEPENDENTS.TXT':

The following SAS program is submitted:

What will be the value of_ERROR_ in the Program Data Vector for each iteration of the DATA step?

  1. A
  2. B
  3. C
  4. D
Show answer and explanation

Correct answer: B

Question 3 Single choice

The following SAS program is submitted:

data work.january;
set work.allmonths (keep = product month num_sold cost);
if month = 'Jan' then output work.january;
sales = cost * num_sold;
keep = product sales;
run;

Which variables does the WORK.JANUARY data set contain?

  1. A

    PRODUCT and SALES only

  2. B

    PRODUCT, MONTH, NUM_SOLD and COST only

  3. C

    PRODUCT, SALES, MONTH, NUM_SOLD and COST only

  4. D

    An incomplete output data set is created due to syntax errors.

Show answer and explanation

Correct answer: D

Question 4 Single choice

Given the following raw data record:

07Jan2005

Which INFORMAT reads this raw data and stores it as a SAS date value?

  1. A

    dmy9.

  2. B

    date9.

  3. C

    ddMMMyy9.

  4. D

    ddmmmyyyy9.

Show answer and explanation

Correct answer: B

Question 5 Single choice

Which step displays a listing of all the data sets in the WORK library?

  1. A

    proc contents lib=WORK
    run;

  2. B

    proc contents lib=WORK.all;
    run;

  3. C

    proc contents data=WORK._all_;
    run;

  4. D

    proc contents data=WORK _ALL_;
    run;

Show answer and explanation

Correct answer: C

Question 6 Single choice

The following SAS program is submitted:

data WORK.ACCOUNTING;
set WORK.DEPARTMENT;
length EmpId $6;
CharEmpid=EmpId;
run;

If data set WORK.DEPARTMENT has a numeric variable EmpId.

Which statement is true about the output dataset?

  1. A

    The type of the variable CharEmpid is numeric.

  2. B

    The type of the variable CharEmpid is unknown.

  3. C

    The type of the variable CharEmpid is character.

  4. D

    The program fails to execute due to errors.

Show answer and explanation

Correct answer: D

Question 7 Single choice

The following SAS program is submitted:

data combine;
prefix='505';
middle='6465 `;
end='09090';
<insert statement here>;
run;

Which statement successfully completes the program so that TOTAL has a value of 505-6465-09090?

  1. A

    total = cat('-', prefix, middle, end);

  2. B

    total = catx('-', prefix, middle, end);

  3. C

    total = prefix !!'-'!! middle ``!!'-'!! end;

  4. D

    total = prefix!!'-'!! left(middle)!!'-'!! end;

Show answer and explanation

Correct answer: B

Question 8 Single choice

The following SAS program is submitted:

data one;
date = `04juI2005'd;
format date weekdate.; run;
proc print data = one; run;

What output is generated?

  1. A

    Obs date
    1 Monday, July 4, 2005

  2. B

    Obs date
    1 July4, 2005

  3. C

    Obs date
    1 04Jul2005

  4. D

    Obs date
    1 Monday, 07/04/2005

Show answer and explanation

Correct answer: A

Question 9 Single choice

Which one of the following SAS DATA steps saves the temporary data set named MYDATA as a permanent data set?

  1. A

    libname sasdata 'SAS-data-library';
    data sasdata.mydata;
    copy mydata;

    run;

  2. B

    libname sasdata 'SAS-data-library';
    data sasdata.mydata;
    keep mydata;
    run;

  3. C

    libname sasdata 'SAS-data-library';
    data sasdata.mydata;
    save mydata;
    run;

  4. D

    libname sasdata 'SAS-data-library';
    data sasdata.mydata;
    set mydata;
    run;

Show answer and explanation

Correct answer: D

Question 10 Single choice

The SAS data set WORK.AWARDS is listed below: fname points
Amy 2
Amy 1
Gerard 3
Wang 3
Wang 1
Wang 2

The following SAS program is submitted:
proc sort data = work.awards;
by descending fname points;
run;

Which one of the following represents how the observations are sorted?

  1. A

    Wang 3
    Gerard 3
    Wang 2
    Amy 2
    Wang 1
    Amy 1

  2. B

    Wang 3
    Wang 2
    Wang 1
    Gerard 3
    Amy 2
    Amy 1

  3. C

    Wang 3
    Wang 1
    Wang 2
    Gerard 3
    Amy 2
    Amy 1

  4. D

    Wang 1
    Wang 2

    Wang 3
    Gerard 3
    Amy 1
    Amy 2

Show answer and explanation

Correct answer: D