最新的SASInstitute SAS 9.4 Base Programming - Performance-based - A00-231免費考試真題
Which of the following SAS programs creates a variable named City with a value ofChicago?
Select one:
Select one:
正確答案: B
Given the SAS data set WORK.TEMPS:

The following program is submitted:

Which output is correct?


The following program is submitted:

Which output is correct?

正確答案: C
Which of the following choices is an unacceptable ODS destination for producing output that can be viewed in Microsoft Excel?
正確答案: B
Scenario:
Continuing with the previous program (program27), add a PROC SORT step that satisfies the following criteria:
* Creates the output dataset results.output27b
* Sorts the observations by order.
* Removes duplicate values of the first occurrence found during the sort.
What is the value of Employee_ID for observation 181 inresults.output27b?
Continuing with the previous program (program27), add a PROC SORT step that satisfies the following criteria:
* Creates the output dataset results.output27b
* Sorts the observations by order.
* Removes duplicate values of the first occurrence found during the sort.
What is the value of Employee_ID for observation 181 inresults.output27b?
正確答案:
120272
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:
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:
Scenario:
This project will use data set cert.input12. At any time, you may
save your program as program12 in cert\programs.
cert.input12 contains a single observation with two variables:
* salary
* year
Write a SAS program that will:
* Create an output data set results.output12.
* Read cert.input12 as input.
* Increase the salary variable by 5.65% annually until it is
greater than $500,000.
* Increment the year variable by 1 with each annual
increase.
* 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 value of year when the above salary occurs? Enter your numeric answer in the space below.
This project will use data set cert.input12. At any time, you may
save your program as program12 in cert\programs.
cert.input12 contains a single observation with two variables:
* salary
* year
Write a SAS program that will:
* Create an output data set results.output12.
* Read cert.input12 as input.
* Increase the salary variable by 5.65% annually until it is
greater than $500,000.
* Increment the year variable by 1 with each annual
increase.
* 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 value of year when the above salary occurs? Enter your numeric answer in the space below.
正確答案:
2027
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;
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;
Which one of the following statements is true regarding the name of a SAS array?
正確答案: A
After a SAS program is submitted, the following is written to the SAS log:
105 data WORK.JANUARY;
106 set WORK.ALLYEAR(keep=Product Month Quantity Cost);
107 if Month='JAN' then output WORK.JANUARY;
108 Sales=Cost * Quantity;
109 drop=Month Quantity Cost;
-----
22
ERROR 22-322: Syntax error, expecting one of the following: !,
!!, , *, **, +, -,
, <=, <>, =, >, >=,
AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL,
NOTIN, OR, ^=, |, ||, ~=.
110 run;
What data set option could be attached to WORK.JANUARY to replace the DROP statement that generated the error in the log?
105 data WORK.JANUARY;
106 set WORK.ALLYEAR(keep=Product Month Quantity Cost);
107 if Month='JAN' then output WORK.JANUARY;
108 Sales=Cost * Quantity;
109 drop=Month Quantity Cost;
-----
22
ERROR 22-322: Syntax error, expecting one of the following: !,
!!, , *, **, +, -,
, <=, <>, =, >, >=,
AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL,
NOTIN, OR, ^=, |, ||, ~=.
110 run;
What data set option could be attached to WORK.JANUARY to replace the DROP statement that generated the error in the log?
正確答案: B
Given the following IF/THEN statement:
If Age NE 16 and Age NE 15 then Group-1;
Which assignment statement for variable Group is functionally equivalent to the original statement used in the above data step?
If Age NE 16 and Age NE 15 then Group-1;
Which assignment statement for variable Group is functionally equivalent to the original statement used in the above data step?
正確答案: C
Given the SAS data set WORK.ONE:

And the SAS data set WORK.TWO:

The following program is submitted:

What is the first observation in the SAS data set WORK.BOTH?


And the SAS data set WORK.TWO:

The following program is submitted:

What is the first observation in the SAS data set WORK.BOTH?

正確答案: C
The following SAS program is submitted:


Why does the program produce an error? Select one:


Why does the program produce an error? Select one:
正確答案: D
Given the AIRPLANES data set
AlRPLANES
TYPE MPG
-------- ------
F-18 105
C-130 25
Harrier 75
A-6 110
The following SAS program is submitted:
data gt100;
set airplanes(keep = type mpg load);
load = mpg * 150;
run;
The program fails to execute due to syntax errors.
What is the cause of the syntax error?
AlRPLANES
TYPE MPG
-------- ------
F-18 105
C-130 25
Harrier 75
A-6 110
The following SAS program is submitted:
data gt100;
set airplanes(keep = type mpg load);
load = mpg * 150;
run;
The program fails to execute due to syntax errors.
What is the cause of the syntax error?
正確答案: C
The following SAS program is submitted:
data work.test;
Author = 'Christie, Agatha';
First = substr(scan(author,2,' ,'),1,1);
run;
Which one of the following is the value of the variable FIRST in the output data set?
data work.test;
Author = 'Christie, Agatha';
First = substr(scan(author,2,' ,'),1,1);
run;
Which one of the following is the value of the variable FIRST in the output data set?
正確答案: B