Select the best answer
for each question. Check your answers using the answer key in the
appendix.
-
As you write and edit
SAS programs, it is a good idea to do the following:
-
Begin DATA and PROC
steps in column one.
-
Indent statements within
a step.
-
Begin RUN statements
in column one.
-
-
Suppose you have submitted
a SAS program that contains spelling errors. Which set of steps should
you perform, in the order shown, to revise and resubmit the program?
-
What happens if you
submit the following program?
proc sort data=sasuser.stress out=maxrates;
by maxhr;
run;
proc print data=maxrates label double noobs;
label rechr='Recovery Heart Rate;
var resthr maxhr rechr date;
where toler='I' and resthr>90;
sum fee;
run;
-
Log messages indicate
that the program ran successfully.
-
A PROC
SORT running message appears at the top of the active
window, and a log message might indicate an error in a statement that
seems to be valid.
-
A log message indicates
that an option is not valid or not recognized.
-
A PROC
PRINT running message appears at the top of the active
window, and a log message might indicate that a quoted string has
become too long or that the statement is ambiguous.
-
What generally happens
when a syntax error is detected?
-
SAS continues processing
the step.
-
SAS continues to process
the step, and the Log window displays messages
about the error.
-
SAS stops processing
the step in which the error occurred, and the Log window
displays messages about the error.
-
SAS stops processing
the step in which the error occurred, and the Output window
displays messages about the error.
-
A syntax error occurs
during the following actions:
-
Some data values are
not appropriate for the SAS statements that are specified in a program.
-
The form of the elements
in a SAS statement is correct, but the elements are not valid for
that usage.
-
Program statements do
not conform to the rules of the SAS language.
-
-
How can you tell whether
you have specified an invalid option in a SAS program?
-
A log message indicates
an error in a statement that seems to be valid.
-
A log message indicates
that an option is not valid or not recognized.
-
The message PROC
STEP running or DATA STEP running appears
at the top of the active window.
-
You cannot tell until
you view the output from the program.
-
Which of the following
programs contains a syntax error?
-
proc sort data=sasuser.mysales;
by region;
run;
-
dat sasuser.mysales;
set mydata.sales99;
where sales<5000;
run;
-
proc print data=sasuser.mysales label;
label region='Sales Region';
run;
-
-
What should you do after
submitting the following program in the Windows or UNIX operating
environment?
proc print data=mysales;
where state='NC;
run;
-
Submit a RUN statement
to complete the PROC step.
-
Recall the program.
Then add a quotation mark and resubmit the corrected program.
-
Cancel the submitted
statements. Then recall the program, add a quotation mark, and resubmit
the corrected program.
-
Recall the program.
Then replace the invalid option and resubmit the corrected program.
-
Suppose you submit a
short, simple DATA step. If the active window displays the message DATA
step running for a long time, what probably happened?
-
You misspelled a keyword.
-
You forgot to end the
DATA step with a RUN statement.
-
You specified an invalid
data set option.
-
Some data values were
not appropriate for the SAS statements that you specified.
-
What types of errors
can PUTLOG statement help you resolve?