O'Reilly logo

SAS 9.4 Macro Language, 5th Edition by

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

macro libraries
copying items from 306
macro name
error message 411
macro names 9
for autocall facility 156
macro parameters 11
keyword parameters 11, 329
positional 328
validating 311
macro processing 15, 39
branching to specified label 316
calling macros 39
compiling macro definitions 40
defining macros 39
executing compiled macros 42
statement processing with macro
activity 18
statement processing without macro
activity 16
summary of 48
macro processor 4, 18
compiling macro definitions 40
evaluating arithmetic expressions 76
evaluating logical expressions 78
executing compiled macros 42
IN (#) logical operator and 371
tracing execution for debugging 372
variables defined by 24
warning message when reference does
not match variable 384
macro quoting 82
how it works 99
masking special characters and
mnemonics 82
mnemonics in passed parameters 84
necessity of 82
referring to already quoted variables 92
special characters in passed parameters
84
unquoting text 97
macro quoting functions 8, 82, 100, 163
%BQUOTE 91
%NRBQUOTE 91
%NRSTR 87
%QSCAN 100
%STR 87
%SUPERQ 93
amount of text to mask 93
compilation functions 83
compilation quoting functions 164
execution functions 84
execution of 164
overview 83
Q functions 100
summary of 96
unmatched quotation marks and
parentheses 164
when to use 85
which function to use 85
macro source code
saving 119
macro statements 13, 158
executing immediately 130
for automatic evaluation 159
lists of 158
open code recursion 127
used in macro definitions 158
used in open code 158
MACRO system option 356
macro triggers 19
macro variable name
error message 406
macro variable names
prefixes 126
macro variable references 4, 32
combining with text 33
creating a period to follow resolved text
35
delimiting names within text 34
generating suffixes for 13
in submit blocks 111
indirect referencing 36
period (.) as delimiter 13
quoting values that might contain 274
resolved by SCL 111
resolving 250
tracing resolution of 385
warning message when reference does
not match variable 384
warning message when references
cannot resolve 365, 366
macro variable resolution
errors 122, 125
examining with SYMBOLGEN 139
problems during DATA step
compilation 131
problems with 125
macro variable scopes
See scopes of macro variables
macro variables 8, 23
See also automatic macro variables
See also global macro variables
See also local macro variables
See also user-defined macro variables
& (ampersand) delimiter and 4
additional scan of long values 148
affecting job execution 109
assigning 54
assigning a response to 321
assigning DATA step values to 240
assigning function results to 146
494 Index

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required