# SAS Base Programming (A00-231) Certification Exam Sample Questions Here are the sample questions which will help you be familiar with SAS Certified Specialist - Base Programming Using SAS 9.4 (A00-231) exam style and structure. We encourage you to try our Demo SAS Base Programming Certification Practice Exam to measure your understanding of exam structure in an environment which simulates the SAS Certified Specialist - Base Programming Certification test environment.

To make your preparation more easy for SAS Certified Specialist - Base Programming (A00-231) exam, we strongly recommend you to use our Premium SAS Base Programming Certification Practice Exam. According to our survey with certified candidates, you can easily score 85% in your actual SAS Certification exam if you can score 100% in our premium SAS Base Programming Certification practice exams.

## SAS A00-231 Sample Questions:

Q1:  Given the SAS data set WORK.INPUT:

Var1 Var2
------ -------
A one

A two
B three
C four

A five

The following SAS program is submitted:

data WORK.ONE WORK.TWO;
set WORK.INPUT;
if Var1='A' then output WORK.ONE;
output;
run;

How many observations will be in data set WORK.ONE?
Enter your numeric answer in the space below.

[.......]

Solution: 8

Determine whether the given solution is correct?

Options:

A. Incorrect

B. Correct

Q2: Given the SAS data set WORK.ONE:

Revenue2008   Revenue2009   Revenue2010
-----------             -----------            -----------
1.2            1.6            2.0

The following SAS program is submitted:

data WORK.TWO;
set WORK.ONE;
Total=sum(of Rev:);
run;

What value will SAS assign to Total?

Options:

A. 3

B. 1.6

C. The program fails to execute due to errors.

D. 4.8

Q3: This project will use the data set sashelp.shoes.

Write a SAS program that will:

Read sashelp.shoes as input.
Create a new SAS data set, work.shoerange.
Create a new character variable
SalesRange that will be used to categorize the observations into three groups.
Set the value of SalesRange to the following:
- Lower when Sales are less than \$100,000.
- Middle when Sales are between \$100,000 and \$200,000, inclusively.
- Upper when Sales are above \$200,000.

Run the program, then use additional SAS procedures to answer the following questions:

How many observations are classified into the “Lower” group?

Solution: 288

Determine whether the given solution is correct?

OPTIONS:

A. Correct

B. Incorrect

Q4: This project will work with the following program:

data work.lowchol work.highchol;
set sashelp.heart;
if
cholesterollt 200 output work.lowchol;
if
cholesterolge 200 output work.highchol;
if cholesterol is missing output work.misschol;
run;

This program is intended to:

- Divide the observations of sashelp.heart into three data sets, work.highchol, work.lowchol, and work.misschol
- Only observations with cholesterol below 200 should be in the work
.lowchol data set.
- Only Observations with cholesterol that is 200 and above should be in the work
.highchol data set.
- Observations with missing cholesterol values should only be in the work
.misschol data set.

Fix the errors in the above program. There may be multiple errors in the program. Errors may be syntax errors, program structure errors, or logic errors. In the case of logic errors, the program may not produce an error in the log. After fixing all of the errors in the program, answer the following questions:

How many observations are in the work.highchol data set?

Solution: 3652

Determine whether the given solution is correct?

OPTIONS:

A. Incorrect

B. Correct

Q5: This project will work with the following program:

data work.lowchol work.highchol;
set sashelp.heart;
if cholesterol lt 200 output work.lowchol;
if
cholesterolge 200 output work.highchol;
if cholesterol is missing output work.misschol;
run;

This program is intended to:

- Divide the observations of sashelp.heart into three data sets, work.highchol, work.lowchol, and work.misschol
- Only observations with cholesterol below 200 should be in the work
.lowchol data set.
- Only Observations with cholesterol that is 200 and above should be in the work
.highchol data set.
- Observations with missing cholesterol values should only be in the work
.misschol data set.

Fix the errors in the above program. There may be multiple errors in the program. Errors may be syntax errors, program structure errors, or logic errors. In the case of logic errors, the program may not produce an error in the log. After fixing all of the errors in the program, answer the following questions:

How many observations are in the work.lowchol data set?

Solution: 1405

Determine whether the given solution is correct?

OPTIONS:

A. Correct

B. Incorrect

Q6: The following SAS program is submitted:

data WORK.TEMP;
Char1='0123456789';
Char2=substr(Char1,3,4);
run;

What is the value of Char2?

OPTIONS:

A. 23

B. 34

C. 345

D. 2345

Q7: The following SAS program is submitted:

proc format;
value score 1 - 50 = 'Fail'
51 - 100 = 'Pass';
run;

Which one of the following PRINT procedure steps correctly applies the format?

OPTIONS:

A.

proc print data = SASUSER.CLASS;
var test;
format test score;
run;

B.

proc print data = SASUSER.CLASS;
var test;
format test score.;
run;
wrong

C.

proc print data = SASUSER.CLASS format = score.;
var test;
run;
wrong

D.

proc print data = SASUSER.CLASS format = score;
var test;
run;

Q8: This project will use the data set sashelp.shoes.

Write a SAS program that will:

> Read sashelp.shoes as input.
> Create a new SAS data set, work.shoerange.
> Create a new character variable
SalesRange that will be used to categorize the observations into three groups.
> Set the value of SalesRange to the following:
- Lower when Sales are less than \$100,000.
- Middle when Sales are between \$100,000 and \$200,000, inclusively.
- Upper when Sales are above \$200,000.

Run the program, then use additional SAS procedures to answer the following questions:

What is the mean value of observations in the “Middle” group?
Round your answer to the nearest whole number.

Solution: 135127

Determine whether the given solution is correct?

OPTIONS:

A. Incorrect

B. Correct

Q9: This project will use data set sashelp.shoes.

Write a SAS program that will:

Read sashelp.shoes as input.
Create the SAS data set work.sortedshoes.

Sort the sashelp.shoes data set:

First by variable product in descending order.
Second by variable sales in ascending order.

Run the program and answer the following questions:

What is the value of the product variable in observation 148?

Solution: Slipper

Determine whether the given solution is correct?

OPTIONS:

A. Correct

B. Incorrect

Q10:This project will use data set sashelp.shoes.

Write a SAS program that will:
- Read sashelp.shoes as input.
- Create the SAS data set work.sortedshoes.

Sort the sashelp.shoes data set:
- First by variable product in descending order.
- Second by variable sales in ascending order.

Run the program and answer the following questions:

What is the value of the Region variable in observation 130?

Solution: Pacific

Determine whether the given solution is correct?

OPTIONS:

A. Incorrect

B. Correct

## Answers:

 Question: 1 Answer: B Question: 2 Answer: D Question: 3 Answer: A Question: 4 Answer: B Question: 5 Answer: A Question: 6 Answer: D Question: 7 Answer: B Question: 8 Answer: B Question: 9 Answer: A Question: 10 Answer: B

Note: Please write us on feedback@analyticsexam.com if you find any data entry error in these SAS Certified Specialist - Base Programming (A00-231) sample questions.