SAS Institute A00-212 SAS Advanced Programming Exam for SAS 9 Online Training
SAS Institute A00-212 Online Training
The questions for A00-212 were last updated at Nov 23,2024.
- Exam Code: A00-212
- Exam Name: SAS Advanced Programming Exam for SAS 9
- Certification Provider: SAS Institute
- Latest update: Nov 23,2024
The following SAS program is submitted:
data one;
do i = 1 to 10;
ptobs = ceil(ranuni(0) * totobs);
set temp point = ptobs
nobs = totobs;
output;
end;
stop;
run;
The SAS data set TEMP contains 2,500,000 observations.
Which one of the following represents the possible values for PTOBS?
- A . any integer between 1 and 10
- B . any real number between 0 and 1
- C . any integer between 1 and 2,500,000
- D . any real number between 1 and 2,500,000
Which one of the following programs contains a syntax error?
- A . proc sql;
select product.*, cost.unitcost, sales.quantity
from product p, cost c, sales s
where p.item = c.item and
p.item = s.item;
quit; - B . proc sql;
select product.*, cost.unitcost, sales.quantity
from product, cost, sales
where product.item = cost.item and
product.item = sales.item;
quit; - C . proc sql;
select p.*, c.unitcost, s.quantity
from product as p, cost as c, sales as s
where p.item = c.item and
p.item = s.item;
quit; - D . proc sql;
select p.*, c.unitcost, s.quantity
from product, cost, sales
where product.item = cost.item and
product.item = sales.item;
quit;
The following SAS code is submitted:
%macro houses(dsn = houses,sub = RANCH);
data &dsn;
set sasuser.houses;
if style = "¬";
run;
%mend;
%houses(sub = SPLIT)
%houses(dsn = ranch)
%houses(sub = TWOSTORY)
Which one of the following is the value of the automatic macro variable SYSLAST?
- A . work.ranch
- B . work.houses
- C . WORK.RANCH
- D . WORK.HOUSES
Given the following SAS data sets ONE and TWO:
ONE TWO
NUM COUNTRY NUM CITY
1 CANADA 3 BERLIN
2 FRANCE 5 TOKYO
3 GERMANY 4 BELGIUM
5 JAPAN
The following SAS program is submitted:
proc sql;
select country
from one
where not exists
(select *
from two
where one.num = two.num);
quit;
Which one of the following reports is generated?
- A . COUNTRY
GERMANY
JAPAN - B . COUNTRY
FRANCE
BELGIUM - C . COUNTRY
CANADA
FRANCE
BELGIUM - D . COUNTRY
CANADA
FRANCE
GERMANY
Which one of the following statements is true?
- A . The WHERE statement can be executed conditionally as part of an IF statement.
- B . The WHERE statement selects observations before they are brought into the PDV.
- C . The subsetting IF statement works on observations before they are read into the PDV.
- D . The WHERE and subsetting IF statements can be used interchangeably in all SAS programs.
The variable attributes of SAS data sets ONE and TWO are shown below:
ONE TWO
# Variable Type Len Pos # Variable Type Len Pos
2 sales Num 8 8 2 budget Num 8 8
1 year Num 8 0 3 sales Char 8 16
1 year Num 8 0
Data set ONE contains 100 observations. Data set TWO contains 50 observations. Both data sets are sorted by the variable YEAR.
The following SAS program is submitted:
data three;
merge one two;
by year;
run;
Which one of the following is the result of the program execution?
- A . No messages are written to the SAS log.
- B . ERROR and WARNING messages are written to the SAS log.
- C . Data set THREE is created with two variables and 50 observations.
- D . Data set THREE is created with three variables and 100 observations.
Given the following SAS statement:
%let idcode = Prod567;
Which one of the following statements stores the value 567 in the macro variable CODENUM?
- A . %let codenum = substr(&idcode,length(&idcode)-2);
- B . %let codenum = substr(&idcode,length(&idcode)-3);
- C . %let codenum = %substr(&idcode,%length(&idcode)-2);
- D . %let codenum = %substr(&idcode,%length(&idcode)-3);
The following SAS program is submitted:
data new (bufsize = 6144 bufno = 4);
set old;
run;
Which one of the following describes the difference between the usage of BUFSIZE= and BUFNO= options?
- A . BUFSIZE= specifies the size of the input buffer in bytes; BUFNO= specifies the number of input buffers.
- B . BUFSIZE= specifies the size of the output buffer in bytes; BUFNO= specifies the number of output buffers.
- C . BUFSIZE= specifies the size of the output buffer in kilobytes; BUFNO= specifies the number of input buffers.
- D . BUFSIZE= specifies the size of the output buffer in kilobytes; BUFNO= specifies the number of output buffers.
Consider the following SAS log:
229 data sasuser.ranch sasuser.condo / view = sasuser.ranch;
230 set sasuser.houses;
231 if style = ‘RANCH’ then output sasuser.ranch;
232 else if style = ‘CONDO’ then output sasuser.condo;
233 run;
NOTE: DATA STEP view saved on file SASUSER.RANCH.
NOTE: A stored DATA STEP view cannot run under a different operating system.
234
235 proc print data = sasuser.condo;
ERROR: File SASUSER.CONDO.DATA does not exist.
236 run;
NOTE: The SAS System stopped processing this step because of errors.
Which one of the following explains why the PRINT procedure fails?
- A . SASUSER.CONDO is a stored DATA step program.
- B . A SAS data file and SAS data view cannot be created in the same DATA step.
- C . A second VIEW=SASUSER.CONDO option was omitted on the DATA statement.
- D . The view SASUSER.RANCH must be processed before SASUSER.CONDO is created.
Which one of the following is an advantage of creating and using a SAS DATA step view?
- A . It can store an index.
- B . It always accesses the most current data.
- C . It works quickly through multiple passes of the data.
- D . It is useful when the underlying data file structure changes.
thank you