What is written to the output raw data file?

Given the SAS data set PEPM.STUDENTS:

PERM.STUDENTS

NAME AGE

Alfred 14

Alice13

Barbara13

Carol14

The following SAS program is submitted:

libname perm ‘SAS data library’;

data students;

set perm. Students;

file ‘file specification’;

put name $15. @5 age 2.;

run;

What is written to the output raw data file?
A . —-I—-10—I—-20—I—- 30
Alfred 14
Alice 13
Barbara 13
Carol 14
B. —- I—-10—I—-20—I—-30
Alfr14
Alic13
Barb13a
Carol 4
C. —-I—-10—I—-20—I—-30
Alfr14ed
Alic130
Barb13ara
Caro141
D. —-I—-10—I—-20—I—-30
Alfred14
Alice13
Barbara13
Carol14

Answer: B

What changes should be made to the KEEP statement to correct the errors in the LOG?

After a SAS program is submitted, the following is written to the SAS log:

105 data january;

106 set allmonths(keep = product month num_sold cost);

107 if month = ‘Jan’ then output january;

108 sales = cost * num_sold;

109 keep = product sales;

——

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,^=,|,II,

110 run;

What changes should be made to the KEEP statement to correct the errors in the LOG?
A . keep product sales;
B. keep product, sales;
C. keep = product, sales;
D. keep = (product sales);

Answer: A

What is the result?

The following SAS program is submitted:

data work.total;

set work.salary(keep = department wagerate);

by department;

if first.department

then payroll = 0;

payroll + wagerate;

if last.department

run;

The SAS data set WORK.SALARY, currently ordered by DEPARTMENT, contains 100 observations for each of 5 departments.

What is the result?
A . The WORK.TOTAL data set contains 5 observations.
B. The WORKTDTAL data set contains 100 observations.
C. The WORKTOTAL data set contains 500 observations.
D. The program fails to execute due to errors.

Answer: A

Which of the following is true concerning the submitted program?

The following program is submitted:

proc sort data=SASUSER.PROJECTS out=PSORT;

by Code descending Date Cost;

run;

Which of the following is true concerning the submitted program?
A . The descending option applies to the variable Code.
B. The variable Code is sorted by ascending order.
C. The PSORT data set is stored in the SASUSER library.
D. The descending option applies to the Date and Cost variables.

Answer: B

Which ODS statements inserted, respectively, in the two location above creates a report stored in an html file?

The following SAS program is submitted:

<_insert_ods_code_>

proc means data=SASUSER.SHOES;

where Product in (‘Sandal’ , ‘Slipper’ , ‘Boot’);

run;

<_insert_ods_code_>

Which ODS statements inserted, respectively, in the two location above creates a report stored in an html file?
A . ods html open=’sales.html’;ods html close;
B. ods file=’sales.html’ / html;ods file close;
C. ods html file=’sales.html’;ods html close;
D. ods file html=’sales.html’;ods file close;

Answer: C