A00-231 無料問題集「SASInstitute SAS 9.4 Base Programming - Performance-based」
Scenario:
This project will use data set cert.input13. At any time, you may
save your program as program13 in cert\programs.
This data set contains 1001 observations and 2 variables:
* Date1, a numeric variable representing an unformatted
SAS date value. Example: 12001.
* Charnum, a character variable representing a monetary
amount. Example: $50,000.
Write a SAS program that will:
* Save the new data set as results.output13.
* Create a new variable Chdate that converts
the datel variable to a character variable that is in the
format ddmonyyyy, such as 11NOV1992.
* Create a new variable num1 that converts
the Charnum variable to a numeric variable.
What is the value ofChdatefor observation 52?
This project will use data set cert.input13. At any time, you may
save your program as program13 in cert\programs.
This data set contains 1001 observations and 2 variables:
* Date1, a numeric variable representing an unformatted
SAS date value. Example: 12001.
* Charnum, a character variable representing a monetary
amount. Example: $50,000.
Write a SAS program that will:
* Save the new data set as results.output13.
* Create a new variable Chdate that converts
the datel variable to a character variable that is in the
format ddmonyyyy, such as 11NOV1992.
* Create a new variable num1 that converts
the Charnum variable to a numeric variable.
What is the value ofChdatefor observation 52?
正解:
30DEC1992
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;
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;
The data set RALESTATE has the variable LOCALFEE with a format or 9. and a variable COUNTRYFEE with a format or 7.; The following SAS program is submitted:
data history;
format local fee country fee percent6.;
set realestate;
local fee = local fee / 100;
country fee = country fee / 100;
run;
What are the formats of the variables LOCALFEE and COUNTRYFEE in the output dataset?
data history;
format local fee country fee percent6.;
set realestate;
local fee = local fee / 100;
country fee = country fee / 100;
run;
What are the formats of the variables LOCALFEE and COUNTRYFEE in the output dataset?
正解:D
解答を投票する
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:
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:
正解:D
解答を投票する
The following SAS program is submitted:
proc means data=work.schools median;
<insert statement(s) here>
run;
Assume thatWork.Schoolshas two numeric variables and the following PROC MEANS report is produced:

Which of the following SAS statements completes the program and creates the desired report? Select one:
proc means data=work.schools median;
<insert statement(s) here>
run;
Assume thatWork.Schoolshas two numeric variables and the following PROC MEANS report is produced:

Which of the following SAS statements completes the program and creates the desired report? Select one:
正解:C
解答を投票する
Given the contents of the raw data file EMPLOYEE:
----|----10----|----20----|----30
Alan
19/2/2004
ACCT
Rob
22/5/2004
MKTG
MaryJane
14/3/2004
EDUC
The following SAS program is submitted:
data emps;
infile 'employee';
input@1 name$
@15 date <insert INFORMAT here>
@25 department$;
run;
Which INFORMAT correctly completes the program?
----|----10----|----20----|----30
Alan
19/2/2004
ACCT
Rob
22/5/2004
MKTG
MaryJane
14/3/2004
EDUC
The following SAS program is submitted:
data emps;
infile 'employee';
input@1 name$
@15 date <insert INFORMAT here>
@25 department$;
run;
Which INFORMAT correctly completes the program?
正解:C
解答を投票する
The SAS data set EMPLOYEE_INFO is listed below:
IDNumber Expenses
2542 100.00
3612 133.15
2198 234.34
2198 111.12
The following SAS program is submitted:
proc sort data = employee_info;
run;
Which one of the following BY statements completes the program and sorts the data sequentially by descending expense values within each descending IDNUMBER value?
IDNumber Expenses
2542 100.00
3612 133.15
2198 234.34
2198 111.12
The following SAS program is submitted:
proc sort data = employee_info;
run;
Which one of the following BY statements completes the program and sorts the data sequentially by descending expense values within each descending IDNUMBER value?
正解:D
解答を投票する