You can use the SAS macro facility to define macros
and macro variables for an SCL program. Then, you can pass parameters
between macros and the rest of the program. Also, through the use
of the autocall and compiled stored macro facilities, macros can be
used by more than one SCL program.
Note: Macro modules can be more
complicated to maintain than a program segment because of the symbols
and macro quoting that might be required. Also, implementing modules
as macros does not reduce the size of the compiled SCL code. Program
statements generated by a macro are added to the compiled code as
if those lines existed at that location in the program.
The
following table lists the SCL macro facility interfaces.
SCL Interfaces to the Macro Facility
|
|
|
|
|
returns the value of
a global macro variable during SCL execution.
|
|
|
returns the value of
a global macro variable as a numeric value.
|
|
|
assigns a value produced
in SCL to a global macro variable.
|
|
|
assigns a numeric value
to a global macro variable.
|
Note: It is inefficient to use
SYMGETN to retrieve values that are not assigned with SYMPUTN. It
is also inefficient to use
&
to reference
a macro variable that was created with CALL SYMPUTN. Instead, use
SYMGETN. In addition, it is inefficient to use SYMGETN and CALL SYMPUTN
with values that are not numeric.