SAS A00-231 SAS 9.4 Base Programming - Performance-Based Exam Practice Test

Page: 1 / 14
Total 36 questions
Question 1

The following SAS program is submitted:

proc means data=work.schools median;

run;

Assume thatWork.Schoolshas two numeric variables and the following PROC MEANS report is produced:

Which of the following SAS statements completes the program and creates the desired report? Select one:



Answer : B


Question 2

Which statement about SAS libraries is true? Select one:



Answer : B


Question 3

SIMULATION

Scenario:

Open the existing program, program48.sasfrom folder cert\errors. At any time, you may save your corrected program asprogram48incert\programs. This program is intended to:

O Create 3 groups for C var: A-G is Group=1; H-N is Group=2; O-Z is Group=3.

O All variations of the variable should be in the same group, i.e. "A" and "a" should be in Group=1.

O Calculate the average of X and Y by Group. There are multiple errors in the program. These may be syntax errors, logic errors, or problems with the program structure. Logic errors might not produce messages in the log, but will cause the program to produce results different than intended. Correct the errors, run the program, and then use the results to answer the next 2 questions. What is the average (mean) of X for Group=2? Enter your answer to the nearest whole number. Enter your numeric answer in the space below:



Answer : A


Question 4

The following SAS program is submitted:

data work.test;

type='SQL';

if type='SAS' then description='SAS Program';

else description='other'; length description 8;

run;

What occurs when the program is submitted?

Select one:



Answer : D


Question 5

SIMULATION

This project will use data set cert.input08a and cert.input08b. At

any time, you may save your program

as program08 in cert\programs.

Both data sets contain a common numeric variable named ID.

Write a program that will use a SAS DATA Step to:

o Combine data sets cert.input08a and cert.input08b by

matching values of the ID variable.

o Write only observations that are in both data sets to a

new data set named results.match08.

o Write all other non-matching observations from either

data set to a new data set named results.nomatch08.

o Exclude all variables that begin with

"ex" from results.nomatch08.

How many observations (rows) are inresults.match08?

Enter your numeric answer in the space below:



Answer : A

SAS code that could be used to solve this project:

proc sort data=cert.input08a out=work.input08a;

by ID;

run;

proc sort data=cert.input08b out=work.input08b;

by ID;

run;

data results.match08 results.nomatch08 (drop=ex: );

merge work.input08a (in=a) work.input08b (in=b);

by ID;

if a and b then output results.match08;

else output results.nomatch08;

run;

proc contents data=results.match08;

run:

proc contents data=results.nomatch08;

run;

The correct answer is: 1200


Question 6

The following SAS program is submitted:

Why does the program produce an error? Select one:



Answer : C


Question 7

SIMULATION

Scenario:

This project will use data set cert.input08a and cert.input08b. At

any time, you may save your program

as program08 in cert\programs.

Both data sets contain a common numeric variable named ID.

Write a program that will use a SAS DATA Step to:

o Combine data sets cert.input08a and cert.input08b by

matching values of the ID variable.

o Write only observations that are in both data sets to a

new data set named results.match08.

o Write all other non-matching observations from either

data set to a new data set named results.nomatch08.

o Exclude all variables that begin with

"ex" from results.nomatch08.

How many variables (columns) are in results.match08



Answer : A

proc sort data=cert.input08b out=work.input08b;

by ID;

run:

data results.match08 results.nomatch08 (drop=ex: );

merge work.input08a (in=a) work.input08b (in=b);

by ID;

if a and b then output results.match08;

else output results.nomatch08;

run;

proc contents data=results.match08;

SAS code that could be used to solve this project:

proc

sort data=cert.input08a out=work.input08a;

by ID;

run:

run;

proc contents data=results.nomatch08;

run;

The correct answer is: 117


Page:    1 / 14   
Total 36 questions