The following SAS program is submitted:
data test;
ployees;
if 2 le years_rvice le 10 then
amount=1000;
el if years_rvice gt 10 then
amount=2000;
el
amount=0;
amount_per_year=years_rice/amount;
run;
Which one of the following values does the variable AMOUNT_PER_YEAR contain if an employee has been with the company for one year?
A. 0
B. 1000
C. 2000
D. . (missing numeric value)
The contents of the raw data file AMOUNT are listed below:
----|----10---|----20---|----30
$1,234
The following SAS program is submitted:
data test;
infile'amount';
input @1 salary 6.;
if _error_ then description='Problems';
el desription='No Problems';
run;
Which one of the following is the value of the DESCRIPTION variable?
A. Problems
B. No Problems
C. ‘ ‘ (missing character value)
D. The value can not be determined as the program fails to execute due to errors.
The contents of the raw data file NAMENUM are listed below:
----|----10---|----20---|----30
Joe xx
The following SAS program is submitted:
data test;
infile'namenum';
input name $ number;
run;
Which one of the following is the value of the NUMBER variable?
A. xx
B. Joe
C. . (missing numeric value)
D. The value can not be determined as the program fails to execute due to errors.
The contents of the raw data file AMOUNT are listed below:
----|----10---|----20---|----30
$1,234
The following SAS program is submitted:
data test;
infile'amount';
input @1 salary 6.;
run;
Which one of the following is the value of the SALARY variable?
A. 1234
B. 1,234
D. . (missing numeric value)
Which one of the following statements is true regarding the SAS automatic _ERROR_ variable?
A. The _ERROR_ variable contains the values ‘ON’ or ‘OFF’.
B. The _ERROR_ variable contains the values ‘TRUE’ or ‘FALSE’.
C. The _ERROR_ variable is automatically stored in the resulting SAS data t.
D. The _ERROR_ variable can be ud in expressions or calculations in the DATA step.
Which one of the following is true when SAS encounters a data error in a DATA step?
A. The DATA step stops executing at the point of the error, and no SAS data t is created.
B. A note is written to the SAS log explaining the error, and the DATA step continues to execute.
C. A note appears in the SAS log that the incorrect data record was saved to a parate SAS file for further examination.
D. The DATA step stops executing at the point of the error, and the resulting DATA t contains obrvations up to that point. The following SAS program is submitted:
alsales (keep=monthsales{12});
hlysales (keep=year product sales);
array monthsales {12};
do i=1 to 12;
monthsales{i}=sales;
end;
run;
The data t named WORK.MONTHLYSALES has one obrvation per month for each of five years for a total of 60 obrvations. Which one of the following is the result of the above program?
A. The program fails execution due to data errors.
B. The program fails execution due to syntax errors.
C. The program executes with warnings and creates the WORK.TOTALSALES data t.
D. The program executes without errors or warnings and creates the WORK.TOTALSALES data t.
The following SAS program is submitted:
alsales;
hlysales(keep=year product sales);
retrain montnsales {12};
array montnsales {12};
doi=1 to 12;
monthsales{i}=sales;
end;
ent+1;
monthsales{ent}=sales;
run;
The data t named WORK.MONTHLYSALES has one obrvation per month for each of five years for a total of 60 obrvations. Which one of the following is the result of the above program?
A. The program fails execution due to data errors.
B. The program fails execution due to syntax errors.
C. The program runs with warnings and creates the WORK.TOTALSALES data t with 60 obrvations.
D. The program runs without errors or warnings and creates the WORK.TOTALSALES data t with 60 obrvations.
The following SAS program is submitted:
data work.january;
t work.allmonths (keep=product month num_sold cost);
if month='jan'then output work.january;
sales=cost*num_sold;
keep=product sales;
Which variables does the WORK.JANUARY data t contain?
A. PRODUCT and SALES only
B. PRODUCT, MONTH, NUM_SOLD and COST only
C. PRODUCT, SALES, MONTH, NUM_SOLD and COST only
D. An incomplete output data t is created due to syntax errors.
The contents of the raw data file CALENDAR are listed below:
-
---|----10---|----20---|----30
01012000
The following SAS program is submitted:
data test;
infile,calendar';
input@1 data mmddyy10.;
if date='01012000'd then event='january 1st'; run;
Which one of the following is the value of the EVENT variable?
A. 01012000
B. January 1st
C. . (missing numeric value)
D. The value can not be determined as the program fails to execute due to errors.
A SAS program is submitted and the following SAS log is produced:
2 data gt100;
3 t ia.airplanes
4 if mpg gt 100 then output;
22 202
ERROR: File WORK.IF.DATA does not exist.
ERROR: File WORK.MPG.DATA does not exist.
ERROR: File WORK.GT.DATA does not exist.
ERROR: File WORK.THEN.DATA does not exist.
ERROR: File WORK.OUTPUT.DATA does not exist.
ERROR 22-322: Syntax error, expecting one of the following: a name,
a quoted string, (,;.END,KEY,KEYS,NOBS,OPEN,POINT,_DATA_,_LAST_,
_NULL_.
ERROR 202-322: The option or parameter is not recognized and will be ignored.
5 run;
The IA libref was previously assigned in this SAS ssion.
Which one of the following corrects the errors in the LOG?
A. Delete the word THEN on the IF statement.
B. Add a micolon at the end of the SET statement.
C. Place quotes around the value on the IF statement.
D. Add an END statement to conclude the IF statement.
The contents of the raw data file SIZE are listed below:
----|----10---|----20---|----30
72 95
The following SAS program is submitted:
data test;
infile 'size';
input@ 1 height 2. @ 4 weight 2;
run;
Which one of the following is the value of the variable WEIGHT in the output data t?
A. 2
B. 72
C. 95
D. . (missing numeric value)
A SAS PRINT procedure output of the WORK.LEVELS data t is listed below:
Obs name level
1 Frank 1
2 Joan 2
3 Sui 2
4 Jo 3
5 Burt 4
6 Kelly .
7 Juan 1
The following SAS program is submitted:
data work . experti;
t work. levels;
if level = . then
experti = 'Unknown';
el if level = 1 then
experti = 'Low';
el if level = 2 or 3 then
experti =' Medium';
el
experti = 'High';
run;
Which of the following values does the variable EXPERTISE contain?
A. Low, Medium, and High only
B. Low, Medium, and Unknown only
C. Low, Medium, High, and Unknown only
D. Low, Medium, High, Unknown, and ‘ ‘ (missing character value)
The contents of the raw data file EMPLOYEE are listed below:
----|----10---|----20---|----30
Ruth 39 11
Jo 32 22
Sue 30 33
John 40 44
The following SAS program is submitted:
data test;
in file' employee';
input employee_ name $ 1-4;
if employee_ name = 'Ruth' then input idnum 10-11; el input age 7-8;
run;
Which one of the following values does the variable IDNUM contain when the name of the employee is “Ruth”?
A. 11
B. 22
C. 32
D. . (missing numeric value)
The contents of the raw data file EMPLOYEE are listed below:
----|----10---|----20---|----30
Ruth 39 11
Jo 32 22
Sue 30 33
John 40 44
The following SAS program is submitted:
data test;
in file' employee';
input employee_ name $ 1-4;
if employee_ name = 'Sue' then input age 7-8;
el input idnum 10-11;
run;
W hich one of the following values does the variable AGE contain when the name of the employee is “Sue”?
A. 30
B. 33
C. 40
D. . (missing numeric value)
The following SAS program is submitted:
libnamesasdata 'SAS-data-library';
data t;
t sasdata .chemists;
if jobcode = 'Chem2'
then description = 'Senior Chemist';
el description = 'Unknown';
run;
A value for the variable JOBCODE is listed below:
JOBCODE
chem2
Which one of the following values does the variable DESCRIPTION contain?
A. Chem2
B. Unknown
C. Senior Chemist
D. ‘ ‘ (missing character value)
The following SAS program is submitted:
libnamesasdata 'SAS-data-library';
data t;
t sasdata .chemists;
if jobcode = 'chem3'
then description = 'Senior Chemist';
el description = 'Unknown';
run;
A value for the variable JOBCODE is listed below:
JOBCODE
CHEM3
Which one of the following values does the variable DESCRIPTION contain?
A. chem3
B. Unknown
C. Senior Chemist
D. ‘ ‘ (missing character value)
Which one of the following ODS statement options terminates output being written to an HTML file?
A. END
B. QUIT
C. STOP
D. CLOSE
The following SAS program is submitted:
<inrt ODS statement here>
proc means data= sasur .shoes;
where product in ('sandal' , 'Slipper' , 'Boot'); run;
Which one of the following ODS statements completes the program and nds the report to an HTML file?
A. ods html = ‘sales .html’;
B. ods file=’sales .html’;
C. ods file html=’sales .html’;
D. ods html file=’sales. html’;
The following SAS program is submitted:
proc format;
value score 1 - 50 = 'Fail'
51-100='Pass';
run;
proc report data=work .cours nowd;
column exam;
define exam / display format=score.;
run;
The variable EXAM has a value of 50.5.
How will the EXAM variable value be displayed in the REPORT procedure output?
A. Fail
B. Pass
C. 50.5
D. . (missing numeric value)
The following SAS program is submitted:
options pageno = 1;
proc print data=sasur. hous;
run;
proc means data=sasur .shoes;
run;
The report created by the PRINT procedure step generates 5 pages of output.
What is the page number on the first page of the report generated by the MEANS procedure step?
A. 1
B. 2
C. 5
D. 6
Which one of the following SAS system options displays the time on a report?
A. TIME
B. DATE
C. TODAY
D. DATETIME