Chapter Contents

Previous

Next
SAS Companion for the OS/390 Environment

Autocall Libraries

An autocall library contains files that define SAS macros. Under OS/390, an autocall library is a partitioned data set. Each autocall macro should be a separate member in a partitioned data set. SAS Institute supplies some autocall macros in the system autocall library; you can also define autocall macros yourself in a user autocall library. In order to use the autocall facility, the SAS system option MAUTOSOURCE must be in effect. (See SAS Language Reference: Dictionary for details about MAUTOSOURCE.)


Specifying a User Autocall Library

You can designate an physical file, or a concatenation of physical files, as your user-written autocall library in any of the following ways:


Example: Specifying an Autocall Library in Batch Mode

In batch mode, you could use the following JCL statements to specify an autocall library:

single autocall library:
//MYJOB    JOB account. ...
//         EXEC SAS,OPTIONS='MAUTOSOURCE'
//SASAUTOS DD DSN=MY.MACROS,DISP=SHR

concatenated autocall library:
//MYJOB    JOB account ...
//         EXEC SAS,OPTIONS='MAUTOSOURCE'
//SASAUTOS DD DSN=MY.MACROS1,DISP=SHR
//         DD DSN=MY.MACROS2,DISP=SHR
//         DD DSN=default.autocall.library,
//            DISP=SHR


Example: Specifying an Autocall Library under TSO

Under TSO, you can specify an autocall library either when you invoke SAS or during a SAS session.

When you invoke SAS:

single autocall library:
sas options('mautosource sasautos=
   "myid.macros"')

concatenated autocall library:
sas options('mautosource sasautos=
   ("myid.macros1","myid.macros2",sasautos)')

During a SAS session:

single autocall library:
options mautosource sasautos=
   'myid.macros';

concatenated autocall library:
options mautosource sasautos=
   ('myid.macros1','myid.macros2',
   sasautos);


Creating an Autocall Macro

To create an autocall macro, do the following:

  1. Create a partitioned data set to function as an autocall library, or use an existing autocall library.

  2. In the autocall library, create a member that contains the source statements for the macro. The member name must be the same as the name of the macro.

Note:   The SAS macro facility allows you to include the underscore character in macro names; however, OS/390 does not allow the underscore character in partitioned data set member names. To create an autocall member for a macro name that contains an underscore, use a pound sign (#) in place of the underscore in the member name. For example, to create an autocall member for a macro named _SETUP_, name the member #SETUP#. However, invoke the macro by the macro name, as follows:

%_setup_
  [cautionend]


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.