A+ rated
How many steps does this program contain?
data national;
set sashelp.baseball;
BatAvg=nHits/nAtBat;
run;
proc contents data=national;
run;
proc print data=national;
run;
proc means data=national;
var BatAvg;
run;
a. one
b. two
c. four
d. eight - correct answer ✔✔ Correct answer: c
RUN, QUIT, DATA, and PROC statements function as step boundaries, which determine when
SAS statements take effect and indicate the end of the current step or the beginning of a new
step.
Running a SAS program can create which of the following?
, a. log
b. output data
c. results
d. all of the above - correct answer ✔✔ Correct answer: d
A SAS program always creates a log. A program can create output data and results as well,
depending on the steps included.
Which of the following is a SAS syntax requirement?
a. Begin each statement in column one.
b. Put only one statement on each line.
c. Separate each step with a line space.
d. End each statement with a semicolon. - correct answer ✔✔ Correct answer: d
All SAS statements must end with a semicolon, but they are free-format. You can begin or end
them anywhere, separate steps with line spaces, and optionally end steps with a RUN
statement.
Does this comment contain syntax errors?
/*
Report created for budget
presentation; revised October 15.
*/
proc print data=work.newloan;
run;
a. No. The comment is correctly specified.
b. Yes. Every comment line must end with a semicolon.
c. Yes. The comment is on more than one line.