Previous Page | Next Page

Initializing and Configuring SAS Software

Invoking SAS in the z/OS Environment


Invocation Methods

You can invoke SAS with any of the following methods:


Invoking SAS under TSO: the SAS CLIST

To invoke SAS under TSO, you execute the SAS CLIST by typing a command (usually SAS ) at the READY prompt. The SAS CLIST is an external file that contains TSO commands and control instructions.

At each site, the name of the command that you use and the SAS CLIST might have been modified by your on-site support personnel. Ask your support personal for site-specific information about the CLIST.

The SAS CLIST starts a SAS windowing environment session, an Explorer session, an interactive line mode session, or a noninteractive session, depending on the defaults that have been specified in the CLIST. To override the mode of running SAS that is specified in the CLIST, you use commands similar to those shown in Commands for Invoking SAS. (Again, the exact commands that you use might be site-specific.)


Invoking SAS under TSO: the SASRX exec

SASRX is a REXX program that you can use to invoke SAS. It is provided as an alternative to the SAS CLIST. SASRX supports the same command-line syntax as the SAS CLIST. It also supports these additional features:

At each site, the command that you use and the SASRX exec itself might have been modified by your on-site SAS support personnel. Ask your support personnel for site-specific information about the SASRX exec. For details about the SASRX exec, see Starting SAS with SASRX.

Throughout this document, references to the SAS CLIST apply equally to the SASRX exec.


Commands for Invoking SAS

The following table contains examples of commands that you can use to invoke SAS.

Commands for Invoking SAS
Mode To Invoke To Terminate Description
SAS windowing environment sas options('dms')

or

sasrx -dms

bye or endsas
enables you to write and execute SAS programs and to view the SAS log and SAS procedure output in an interactive windowing environment. If this is the default at your site, then you can invoke it by entering sas (or sasrx) with no options.
Explorer sas options('explorer')

or

sasrx -explorer

bye or endsas enables you to manipulate SAS data and files visually, launch SAS applications, and access SAS windowing environment windows and Output Delivery System hierarchies.
interactive line mode sas options('nodms')

or

sasrx -nodms

/* or endsas; statement prompts you to enter SAS statements at your terminal, one line at a time.
noninteractive mode sas input('''my.sas.program''')

or

sasrx -input 'my.sas.program'

not applicable executes interactively, but it is called noninteractive because the program runs with no intervention from the terminal.


Invoking SAS in Batch Mode: the SAS Cataloged Procedure

To invoke SAS during a batch job, use a JCL EXEC statement that executes the SAS cataloged procedure that invokes SAS, such as

//MYJOB EXEC SAS

By specifying parameters in the JCL EXEC statement, you can modify the way in which SAS is invoked.

At each site, the JCL EXEC statement that you use and the cataloged procedure itself might have been modified by your on-site SAS support personnel. Ask your support personnel for site-specific information.


Logging On to SAS Software Directly

z/OS sites can choose to substitute SAS for the standard TSO terminal monitor program, enabling users to log on to SAS directly. If SAS comes up automatically when you log in, then your system might have already been set up to log on to SAS directly.

By automatically invoking SAS software or a SAS application when users log on, site administrators can insulate users from the TSO environment. Because SAS is running as its own terminal monitor program, TSO commands are not accessible to users. This reduces memory usage slightly.

This method of invoking SAS also provides the following advantages:

Your on-site SAS support personnel can find complete information about this method of invoking SAS in the installation instructions for SAS in the z/OS environment.


What If SAS Does Not Start?

If SAS does not start, the SAS log might contain error messages that explain the failure. Any error messages that SAS issues before the SAS log is initialized are written to the SAS Console Log, which is the SASCLOG ddname destination. Under TSO, the SASCLOG ddname destination is normally the terminal, but the destination might be changed by the on-site SAS support personnel by changing the CLIST or SASRX exec that invoked SAS. Similarly, a batch job or started task normally assigns the SASCLOG ddname to a spooled SYSOUT class, but the destination might have been changed by the on-site SAS support personnel by changing the catalog procedure used to invoke SAS. Spooled SYSOUT data can be printed or viewed online with a JES spool viewer such as SDSF, IOF, or EJES.

Previous Page | Next Page | Top of Page