Quiz:
Improving
Program Efficiency with Macro Variables
Select the best answer for each question and click Score My Quiz.
-
Macro variables can be defined
and referenced anywhere in a SAS program except within...
-
Which assignment statement will
set the value of
Day to a text string containing the
day of the week?
-
Which statement will create a
macro variable named
region that has the value northwest?
-
What is the result of including
the following line in your program?
options symbolgen;
-
When SAS software encounters a
macro variable reference but cannot locate the macro variable, the
reference is left unresolved. What happens next?
-
Suppose your program creates a
macro variable named
period that contains the value End.
How would you use this macro variable to reference the variable EndDate
in the program?
-
Suppose your program creates a
macro variable named
libref that contains the value sales.
Another macro variable, named libname , contains the value
q3y2001. How would you use these macro variables to reference
the data set Sales.Q3y2001?
-
You use the CALL SYMPUT routine
to create a macro variable whose value is assigned...
-
Why is a PUT function embedded
in this CALL SYMPUT statement?
call symput('total',put(totover,2.));
-
What is wrong with the following
program?
title "Temporary Employees Worked &total OT Hours";
data hrd.overtime;
set hrd.temp(keep=name overtime) end=last;
if overtime ne .;
TotOver+overtime;
if last then call
symput('total',put(totover,2.));
run;
proc print data=hrd.overtime;
run;
|