Select the best answer
for each question. After completing the quiz, check your answers using
the answer key in the appendix.
-
Which of the following
statements is false?
-
A macro variable can
be defined and referenced anywhere in a SAS program except within
data lines.
-
Macro variables are
always user-defined, and their values remain constant until they are
changed by the user.
-
Macro variables are
text strings that are independent of SAS data sets.
-
The values of macro
variables can be up to 65,534 characters long.
-
Which of the following
TITLE statements correctly references the macro variable Month?
-
title "Total Sales for '&month' ";
-
title "Total Sales for 'month'";
-
title "Total Sales for &month";
-
title Total Sales for "&month";
-
Which of the following
statements generates an error message while trying to display the
value of the macro variable Month in the SAS log?
-
-
-
-
%PUT the macro variable MONTH has the value &month.;
-
Which statement creates
a macro variable named Location that has the value storage
?
-
-
-
%let location = "storage";
-
-
What value will these
statements assign to the macro variable Reptile?
%let area = "Southeast";
%let reptitle = * Sales Report for &area Area *;
-
Sales Report for Southeast Area
-
Sales Report for "Southeast" Area
-
*Sales Report for "Southeast" Area*
-
* Sales Report for "Southeast" Area *
-
If a macro trigger is
embedded in a literal token and you want the trigger to resolve, then
the literal string must be enclosed in double quotation marks.
-
What are the four types
of tokens that SAS recognizes?
-
expressions, literals,
names, and special characters
-
literals, names, numbers,
and special characters
-
expressions, names,
numbers, and special characters
-
expressions, literals,
numbers, and special characters
-
Which statement about
the macro processor is false?
-
It compiles and executes
macro statements.
-
It breaks SAS programs
into tokens.
-
It writes macro variables
and values to the global symbol table.
-
It reads values from
the global symbol table and writes them to the input stack.
-
How does the word scanner
detect the end of a token?
-
It encounters a new
token, or encountering a blank delimiter.
-
It encounters the end-of-file
character.
-
-
It encounters a statement
such as RUN or QUIT.