sas a00-211 practice test

Exam Title: SAS Base Programming for SAS 9

Last update: Nov 27 ,2025
Question 1

The following SAS program is submitted:
proc sort data = work.employee;
by descending fname;
proc sort data = work.salary;
by descending fname;
data work.empdata;
merge work.employee
work.salary;
by fname;
run;
Why does the program rail to execute?

  • A. The SORT procedures contain invalid syntax.
  • B. The merged data sets are not permanent SAS data sets.
  • C. The RUN statement was omitted alter each or the SORT procedures.
  • D. The data sets were not merged in the order by which they were sorted.
Answer:

D

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 2

The following SAS program is submittad:
data work.sales;
do year = 1 to 5;
do month=1 to 12;
x+1;
output
end;
end;
run;
How many observations are written the WORK SALES data set?

  • A. 0
  • B. 1
  • C. 5
  • D. 60
Answer:

D

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 3

Given the following raw data record:
----I----10---I----20---I----30
son Travis,
The following output is desired:
Obs relation firstname
1 son Travis
Which SAS program correctly reads in the raw data?

  • A. data family ( dIm = ‘,’); infile ‘tile specification’; input relation $ firstname $; run;
  • B. options dIm = ‘,’; data family; infile ‘file specification’; input relation $ firstname $; run;
  • C. data family; infile ‘file specification’ dIm = ‘,’; input relation $ firstname $; run;
  • D. data family; infile ‘file specification’; input relation $ firstname $ / dim = ‘,’; run;
Answer:

C

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 4

Given the SAS data set AGES:
AGES
AGE
---------
The variable AGE contains character values. The following SAS program is submitted:
data subset;
set ages;
where age> 12;
run;
How many observations are written out to the data set SUBSET?

  • A. 0
  • B. 1
  • C. 2
  • D. 3
Answer:

A

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 5

Given the SAS data set PRICES:
PRICES
prodid price
K12S5.10producttype
NETWORKsales
15returns
B132S 2.34HARDWARE30010
R18KY21.29SOFTWARE255
3KL8BY 6.37HARDWARE12515
DY65DW 5.60HARDWARE455
DGTY23 4.55HARDWARE672
The following SAS program is submitted:
data hware inter soft;
set prices (keep = producttype price);
if price le 5.00;
if producttype = ‘HARDWARE’ then output HWARE;
else if producttype = ‘NETWORK’ then output INTER;
else if producttype = ‘SOFTWARE’ then output SOFT;
run;
How many observations does the HWARE data set contain?

  • A. 0
  • B. 2
  • C. 3
  • D. 4
Answer:

B

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 6

The following SAS program is submitted:
data work.accounting;
set work.department;
length jobcode $ 12;
jobcode=’FAl’;
run;
The WORK.DEPARTMENT data set contains a character variable named JOBCODE with a length of 5.
What is the result?

  • A. The length of the variable JOBCODE is 3.
  • B. The length of the variable JOBCODE is 5.
  • C. The length of the variable JOSBODE is 12.
  • D. The program fails to execute due to errors.
Answer:

B

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 7

Which ODS statement option terminates output being written to an HTML rile?

  • A. END
  • B. QUIT
  • C. STOP
  • D. CLOSE
Answer:

D

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 8

The SAS data set PETS is sorted by the variables TYPE and BREED.
The following SAS program is submitted:
proc print data = pets;
var type breed;
sum number;
run;
What is the result?

  • A. The SUM statement produces only a grand total of NUMBER.
  • B. The SUM statement produces only subtotals of NUMBER for each value of TYPE.
  • C. The SUM statement produces both a grand total of NUMBER and subtotals of NUMBER for each value of TYPE.
  • D. Nothing is produced by the SUM statement; the program fails to execute.
Answer:

A

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 9

The following SAS program is submitted:
data work.passengers;
if OrigPassengers = . then'
OrigPassengers = 100;
TransPassengers = 100;
OrigPassengers = .;
TotalPassengers = sum (OrigPassengers, TransPassengers) +0;
run;
What is the value of the TOTALPASSENGERS variable in the output data set?

  • A. 0
  • B. 100
  • C. 200
  • D. (missing numeric value)
Answer:

B

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 10

Given the SAS data set PRICES:
PRICES
Prodid priceproducttypesalesreturns
K1255.10NETWORK152
B132S 2.34HARDWARE30010
R18KY2 1.29SOFTWARE255
3KL8BY 6.37HARDWARE12515
DY65DW 5.60HARDWARE455
DGTY23 4.55HARDWARE672
The following SAS program is submitted:
data hware inter cheap;
set prices(keep = productype price);
if producttype = ‘HARDWARE’ then output hware; else if producttype = ‘NETWORK’ then output
inter; if price le 5.00;
run;
if producttype = ‘HARDWARE’ then output hware; else if producttype = ‘NETWORK’ then output
inter; if price le 5.00;
run;
How many observations does the HWARE data set contain?

  • A. 0
  • B. 2
  • C. 3
  • D. 4
Answer:

D

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Page 1 out of 26
Viewing questions 1-10 out of 270
Go To
page 2