SAS Institute A00-231 Practice Exams
Last updated on Oct 21,2026- Exam Code: A00-231
- Exam Name: SAS 9.4 Base Programming -- Performance-based exam
- Certification Provider: SAS Institute
- Latest update: Oct 21,2026
Which of the following SAS programs creates a variable named City with a value ofChicago?
Select one:
- A . data work.airport;
AirportCode=’ord’;
if (AirportCode=’ord’) City=’Chicago’;
run; - B . data work.airport;
AirportCode=’ORD’;
if AirportCode=’ORD’ then City=Chicago;
run; - C . data work.airport;
AirportCode=’ORD’;
if AirportCode=’ORD’;
then City=’Chicago’;
run; - D . data work.airport;
AirportCode=’ORD’;
if AirportCode=’ORD’ then City=’Chicago’;
run;
SIMULATION
This project will use data set cert.input08a and cert.input08b. At any time, you may save your program as program08 in certprograms.
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:
Explanation:
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
SIMULATION
Scenario:
This project will use data setcert.input36. At any time, you may save your program asprogram36 in certprograms.
Write a SAS program that will clean the data incert.input36as follows:
Step 1:
create a temporary data set, cleandata36.
In this data set, convert all case.
Then keep only observations with group equal to ‘A’ or ‘B’.
Step 2:
Determine the MEDIAN value for the Kilograms variable for each group(A,B) in the cleandata36
data set. Round MEDIAN to the nearest whole number.
Step 3:
Create results.output36 from cleandata36
Ensure that all values for variable Kilogramsare between 40 and 200, inclusively.
If the value is missing or out of range, replace the value with the MEDIAN Kilograms value for the respectivegroup(A, B) calculated in step 2
Explanation:

SIMULATION
Scenario:
Continuing with the previous program (program27), add a PROC SORT step that satisfies the following criteria:
o Creates the output dataset results.output27b
o Sorts the observations by order.
o Removes duplicate values of the first occurrence found during the sort.
What is the value of Employee_ID for observation 98 inresults.output27b?
Explanation:
proc sort data=cert.input27 out=results.output27b nodupkey;
by descending postal_code;
run;
proc print data=results.output27b (firstobs=98 obs=181);
var employee_ID;
run:
SIMULATION
Scenario:
This project will use data set cert.input12. At any time, you may save your program as program12 in certprograms.
cert.input12 contains a single observation with two variables:
o salary o year
Write a SAS program that will:
o Create an output data set results.output12.
o Read cert.input12 as input.
o Increase the salary variable by 5.65% annually until it is greater than $500,000.
o Increment the year variable by 1 with each annual increase.
o Create an output data set results.output12 that has one observation for each value of year. Each observation should have a year and salary variable.
What is the maximum salary hat is less than $500,000? Enter your numeric answer in the space below (Round your answer to the nearest integer)
Explanation:
data results.output12;
set cert.input12;
do until (salary gt 500000);
salary=salary*1.0565;
year+1;
output;
end;
run;
proc print data=results.output 12;
run;
Variable Name would have a format of $CHAR15. in the new data set Work. Both. The LENGTH statement only gives the variable Name a predefined maximum length.
The correct answer is:
$CHAR15 Given the SAS data set WORK.ONE:
X Y Z
– – —
1A27
1A33
1B45
2A52
2B69
3B70
4A82
4C91
The following SAS program is submitted: data WORK.TWO;
set WORK.ONE; by X Y;
if First.Y; run; proc print data=WORK.TWO noobs; run;
Which report is produced? Select one:
- A . XYZ
— — —
1B45
2A52
2B69
3B70
4A82
4C91 - B . XYZ
— — —
1A27
1B45
2A52
2B69
3B70
4A82
4C91 - C . XYZ
— — —
1A33
1B45
2A52
2B69
3B70
4A82
4C91 - D . XYZ
— — —
1A27
1B45
2A52
2B69
4A82
4C91
SIMULATION
Scenario:
Continuing with the previous program (program27), add a PROC SORT step that satisfies the following criteria:
o Creates the output dataset results.output27b
o Sorts the observations by order.
o Removes duplicate values of the first occurrence found during the sort.
What is the value of Employee_ID for observation 181 inresults.output27b?
Explanation:
proc sort data=cert.input27 out=results.output27b nodupkey;
by descending postal_code;
run;
proc print data=results.output27b (firstobs=98 obs=181);
var employee_ID;
run:
SIMULATION
Scenario:
This project will use data set cert.input13. At any time, you may save your program as program13 in certprograms.
This data set contains 1001 observations and 2 variables:
o Date1, a numeric variable representing an unformatted SAS date value. Example: 12001.
o Charnum, a character variable representing a monetary amount. Example: $50,000.
Write a SAS program that will:
o Save the new data set as results.output13.
o Create a new variable Chdate that converts
the datel variable to a character variable that is in the format ddmonyyyy, such as 11NOV1992.
o Create a new variable num1 that converts the Charnum variable to a numeric variable.
What is the value ofChdatefor observation 52?
Explanation:
data results.output13;
set cert.input13;
Chdate=put(date 1,date9.);
num 1=input(Charnum,dollar7.);
run;
proc print data=results.output13 (firstobs=52 obs=52);
run;
Given the following SAS data set WORK.CLASS:
Name Gender Age
Anna F 23
Ben M 25
Bob M 21
Brian M 27
Edward M 26
Emma F 32
Joe M 34
Sam F 32
Tom M 24
The following program is submitted: data WORK.MALES WORK.FEMALES(drop=age); set WORK.CLASS; drop gender; if Gender="M" then output WORK.MALES; else if Gender="F" then output WORK.FEMALES; run;
How many variables are in the data set WORK.MALES? Select one:
- A . The program does not execute due to a syntax error.
- B . 1
- C . 2
- D . 3
Given the following SAS data set WORK.TOYS:
Product Group Price
——— ———– —–
Cards Indoors 9.99
Marbles Indoors 8.99
Drum Instruments 12.99
Hula-Hoop Outdoors 12.99
Ball Outdoors 8.49
The following SAS program is submitted:
data WORK.GROUPS;
set WORK.TOYS;
if Group="Outdoors" then Price_Gp="C";
if Price ge 12.99 then Price_Gp="A";
else if Price ge 8.99 then Price_Gp="B";
run;
What will be the value of Price_Gp for Hula-Hoop and Ball? Select one:
- A . Hula-Hoop: ‘A’, Ball: ‘ ‘ (missing value)
- B . Hula-Hoop: ‘A’, Ball: ‘C’
- C . Hula-Hoop: ‘C’, Ball: ‘ ‘ (missing value)
- D . Hula-Hoop: ‘C’, Ball: ‘C’