Macro Facility under OpenVMS |
What Is an Autocall Library? |
An autocall library contains files or members that define SAS macros. The autocall facility enables you to invoke a macro without having previously defined that macro in the same SAS program. To use the autocall facility, the SAS system option MAUTOSOURCE must be in effect. (For information about the MAUTOSOURCE system option, see SAS Language Reference: Dictionary.)
Available Autocall Macros |
SAS supplies some autocall macros. When SAS is installed, a SASAUTOS logical name is defined. This OpenVMS logical name refers to the location of the default macros that are supplied by SAS. Whether this logical name is placed in the system-level logical name table or in the process-level logical name table is site-dependent.
You can also define your own autocall macros in a user autocall library.
Creating an Autocall Macro |
To create an autocall macro, perform the following tasks:
Create either an OpenVMS directory or an OpenVMS text library to function as an autocall library, or use an existing autocall library.
In the autocall library, create a file (file type .SAS) or member (file type .TLB) that contains the source statements for the macro. The filename or member name must be the same as the name of the macro. For example, if a file named PRTDATA.SAS is stored in an OpenVMS directory, then the file must define a macro named PRTDATA. Similarly, if the text library MYLIB.TLB contains the member DATACONT, then that member must define a macro named DATACONT.
Specifying a User Autocall Library |
Use the SAS system option SASAUTOS to specify the location of one or more user autocall libraries. (For more information about this option, see SASAUTOS= System Option: OpenVMS.) You can specify autocall libraries either when you invoke SAS or during a SAS session, as follows:
SAS/MAUTOSOURCE/SASAUTOS="[mydir]" [dir]program
SAS/MAUTOSOURCE/SASAUTOS=("[mydir1]", "[mydir2]",sasautos) [dir]program
Note: Invocation options are separated by forward slashes following the SAS command.
During a SAS session (using an OPTIONS statement in your program):
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.