www.sas.com > SAS UK > In the Know Homepage Search | Contact Us    
SAS UK Newsletter Banner SAS - The power to know(tm)  

A Technical look at What's New in SAS 9


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.

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.

The &YSSCPL automatic macro variable returns a value for the Windows XP and Windows Server 2003 operating environments.

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

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.