What's New in the SAS 9.0 and 9.1 Macro Language Facility
Overview
There are several enhancements to the Macro Language Facility including
a new automatic macro variable, new comparison operators, new SAS system options,
new macro statements, new functions, and a new option for the %MACRO statement.
Note:
- This section describes the features of the SAS Macro Facility
that are new or enhanced since SAS 8.2.
- z/OS is the successor to the OS/390 operating system. SAS 9.1
is supported on both OS/390 and z/OS operating systems and, throughout this
document, any reference to z/OS also applies to OS/390, unless otherwise stated.
New Automatic Macro Variable
- To take advantage of the new parallel-processing abilities in
SAS, the new read-only automatic macro variable, &SYSNCPU contains the current number of CPUs that SAS can use during the
current
SAS session.
New Comparison Operators
- The IN mnemonic operator is a
binary comparison
operator similar to that of the DATA step, except that the operand on the
right side is simply a list of values and is not enclosed in parentheses.
The IN operator compares the value of the operand on the left side against
the list of values in the operand on the right side.
- You can use the # character as an alternate spelling
for the IN operator.
New SAS System Options
These are the new macro system options:
- The
MPRINTNEST system option enables the macro
nesting information to be displayed in the MPRINT output in the SAS log.
- The MLOGICNEST system
option enables the macro
nesting information to be displayed in the SAS log.
- The MINDELIMITER system option specifies the
character to be used as the delimiter for the macro IN operator.
- The MCOMPILENOTE system option
specifies that
a NOTE be issued to the SAS log when the compilation of a macro is completed.
- The MAUTOLOCDISPLAY
system option specifies
that the source location of the autocall macro be displayed in the SAS log
when the autocall macro is invoked.
New Macro Statements
- The %ABORT statement stops the
macro that
is executing along with the current DATA step, SAS job, or SAS session.
- The %RETURN statement causes
normal termination
of the currently executing macro.
- The %COPY statement copies specified items
from a SAS macro library.
New Macro Functions
- The %SYMEXIST function returns an
indication
of the existence of a macro variable.
- The %SYMGLOBL function returns an indication
as to whether a macro variable is global in scope.
- The %SYMLOCAL function returns an indication
as to whether a macro variable is local in scope.
New Option for the %MACRO Statement
- SOURCE is a new
option that is issued
in the %MACRO statement. When used with the existing STORE option, the SOURCE
option combines and stores the source of the compiled macro with the compiled
macro code as an entry in a SAS catalog in a permanent SAS data library.