This quiz, titled 'SAS Chapter 10: Processing Macro Variables at Execution Time,' tests knowledge on macro variable processing in SAS. It covers creating, assigning, and referencing macro variables, and differentiating true statements from false regarding macro processing.
Two ampersands resolve to one ampersand.
If more than four consecutive ampersands precede a name token, the macro processor generates an error message.
Re-scanning continues until there are no remaining macro triggers that the macro processor can resolve.
The macro processor always re-scans a name token that is preceded by multiple ampersands or by multiple percent signs.
Rate this question:
Call symput(daily_fee, put(fee/days, dollar8.);
%let daily_fee=put(fee/days, dollar8.)
Select fee/days format=dollar8. into :daily_fee from sasuser.all;
Select fee/days format=dollar8. into daily_fee from sasuser.all;
Rate this question:
data new; set sasuser.all; if location='Boston' then do; call symput('region', 'East'); end; else do; call symput('region', 'West'); end; run;
data new; set sasuser.all; if location='Boston' then do; %let region=East; end; else %let region=West; end; run;
data new; set sasuser.all; if location='Boston' then do; call symput(region, "East"); end; else call symput(region, "West"); end; run;
data new; set sasuser.all; if location='Boston' then do; symput(region, East); end; else symput(region, West); end; run;
Rate this question:
&TEACH3
TEACH3
Forest, Mr. Peter
None of the above
Rate this question:
A %LET statement causes the macro processor to create a macro variable before the program is compiled.
To create a macro variable that is based on data calculated by the DATA step, you use the SYMPUT function.
Macro functions are always processed during the execution of the DATA step.
Macro variable references in a DATA step are always resolved prior to DATA step execution.
Rate this question:
The SYMPUT routine can be used to create a macro variable during execution of the DATA step or during execution of an SCL program.
In the DATA step, the SYMPUT routine automatically converts to a character value any numeric value that you attempt to assign as the value of a macro variable.
PROC SQL automatically converts to a numeric value any macro variable value that you attempt to compare to a numeric value.
In an SCL program, the SYMPUTN routine can be used to assign a numeric value to a macro variable.
Rate this question:
Be used to assign a data set variable as a value to a macro variable.
Create a series of macro variables in one DATA step.
Automatically convert a numeric value to a character value when used to assign a value to a macro variable in a DATA step.
Be used to assign a numeric value to a macro variable in an SCL program.
Rate this question:
data _null_; set sasuser.courses; call symput(course_code, trim(course_title)); %let crsid=C005; proc print data=sasuser.schedule noobs label; where course_code="&crsid"; var location begin_date teacher; title1 "Schedule for &c005"; run;
data _null_; set sasuser.courses; call symput(course_code, trim(course_title)); run; %let crsid=C005; proc print data=sasuser.schedule noobs label; where course_code="&crsid"; var location begin_date teacher; title1 "Schedule for &&&crsid"; run;
data _null_; set sasuser.courses; call symput('course_code', trim(course_title)); run; %let crsid=C005; proc print data=sasuser.schedule noobs label; where course_code="&crsid"; var location begin_date teacher; title1 "Schedule for &&&crsid"; run;
data _null_; set sasuser.courses; call symget(course_code, trim(course_title)); run; %let crsid=C005; proc print data=sasuser.schedule noobs label; where course_code="&crsid"; var location begin_date teacher; title1 "Schedule for &&&crsid"; run;
Rate this question:
Price=&daily_fee;
Price=symget(daily_fee);
Price=symget(&daily_fee);
Price=symget("daily_fee");
Rate this question:
Quiz Review Timeline (Updated): Mar 17, 2023 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
SAS QUIZ(100% NEW AND REAL TIME QUESTIONS)
This SAS quiz features real-time questions assessing skills in data handling, debugging, and SQL operations within SAS. It is designed for learners seeking to test and enhance...
Questions:
20 |
Attempts:
484 |
Last updated:
Mar 20, 2023
|
SAS Chapter 22: Using Best Practices
In our ongoing SAS quiz series, we turn our attention to the different practices and which is the best to use in a given situation. What do you know about IF statements, PROC...
Questions:
5 |
Attempts:
106 |
Last updated:
Dec 06, 2023
|
SAS Chapter 12: Storing Macro Programs
This SAS Chapter 12 quiz focuses on storing macro programs. It tests knowledge on %INCLUDE statements, storing macros in SAS catalogs, using the Stored Compiled Macro Facility,...
Questions:
10 |
Attempts:
330 |
Last updated:
Mar 15, 2023
|
SAS Chapter 11: Creating And Using Macro Programs
This quiz assesses knowledge in SAS Macro Programming, focusing on macro creation, parameter handling, and conditional statements. It tests the ability to define, reference, and...
Questions:
10 |
Attempts:
1202 |
Last updated:
Aug 21, 2023
|
SAS Chapter 9: Introducing Macro Variables
This SAS Chapter 9 quiz focuses on macro variables, testing understanding through questions on their creation, manipulation, and error handling. It's designed to enhance...
Questions:
10 |
Attempts:
724 |
Last updated:
Jan 30, 2024
|
Chapter 8: Managing Processing Using PROC SQL
This quiz in Chapter 8 focuses on managing processing using PROC SQL in SAS. It tests knowledge on syntax, options like INOBS, and specific SQL commands for data handling and...
Questions:
10 |
Attempts:
136 |
Last updated:
Mar 21, 2023
|
Wait!
Here's an interesting quiz for you.