The DATA= option specifies
the data set that you are listing, and the ID statement replaces the
Obs column with the specified variable. The VAR statement specifies
variables and controls the order in which they appear, and the WHERE
statement selects rows based on a condition. The LABEL option in the
PROC PRINT statement causes the labels that are specified in the LABEL
statement to be displayed.
Correct answer: a
You use the DATA= option
to specify the data set to be printed. The LABEL option specifies
that variable labels appear in output instead of in variable names.
Correct answer: d
In the WHERE statement,
the IN operator enables you to select observations based on several
values. You specify values in parentheses and separated by spaces
or commas. Character values must be enclosed in quotation marks and
must be in the same case as in the data set.
Correct answer: c
In a PROC SORT step,
you specify the DATA= option to specify the data set to sort. The
OUT= option specifies an output data set. The required BY statement
specifies the variable or variables to use in sorting the data.
Correct answer: d
You do not need to name
the variables in a VAR statement if you specify them in the SUM statement,
but you can. If you choose not to name the variables in the VAR statement
as well, then the SUM statement determines their order in the output.
Correct answer: c
The BY statement is
required in PROC SORT. Without it, the PROC SORT step fails. However,
the PROC PRINT step prints the original data set as requested.
Correct answer: a
Column totals appear
at the end of the report in the same format as the values of the variables,
so b is incorrect. Work.Loans is sorted by Month and Amount, so c
is incorrect. The program sums both Amount and Payment, so d is incorrect.
Correct answer: c
To ensure that the compound
expression is evaluated correctly, you can use parentheses to group
the observations:
account='101-1092' or rate eq 0.095
For example, from the
data set above, a and b select observations 2 and 8 (those that have
a rate of 0.095); c selects no observations; and d selects observations
4 and 7 (those that have an amount less than or equal to 5000).
Correct answer: d
By default, PROC PRINT
prints all observations and variables. An Obs column is generated
to identify the observation number, and variables and observations
appear in the order in which they occur in the data set.