Chapter Contents

Previous

Next
SAS Companion for the OS/390 Environment

Macro Variables


Portable Automatic Macro Variables That Have Host-Specific Values

The following automatic macro variables are portable, but their values are host-specific:

SYSCC
contains the current SAS condition code that SAS will translate into a meaningful return code for OS/390 at the conclusion of the SAS session.

SYSDEVIC
contains the name of the current graphics device. The current graphics device is determined by the SAS system option DEVICE=. (See DEVICE=.) Ask your lcoal SAS Support Consultant which graphics devices are available at your site.

SYSENV
is provided for compatibility with the SAS System on other operating environments. Under OS/390, its value is FORE if you are running SAS under TSO; otherwise, its value is BACK. You cannot change the value of this variable.

SYSJOBID
contains the job name of the batch job that is currently executing, or the user ID that is associated with the current SAS session. SAS obtains this value from the TIOCNJOB field of the TIOT control block, except in the case of SAS/SESSION. With SAS/SESSION, SAS obtains the value from the User_id field that is returned by the Get_TP_Properties service of APPC/MVS. You cannot change the value of this variable.

SYSMAXLONG
returns the maximum long integer value allowed by OS/390, which is 2,147,483,647.

SYSRC
contains the return code from the most recent operating environment command that was issued from within a SAS session. The default value is 0.

SYSSCP
contains the operating environment abbreviation OS. You cannot change the value of this variable.

SYSSCPL
contains the operating environment name. For systems prior to OS/390 Release 1, SYSSCPL contains the value MVS. For OS/390 releases, SYSSCPL contains the value OS/390. You cannot change the value of this macro variable.


OS/390-Specific Macro Variables

The following macro variables are available only under OS/390:

SYSDEXST
contains the value that is returned by the DSNEXST statement. (See DSNEXST.) SYSDEXST has a value of 1 if the data set specified in the DSNEXST statement is currently available, or a value of 0 if the data set is not currently available.

SYSJCTID
contains the value of the JCTUSER field of the JCT control block as mapped by the IEFAJCTB macro. It is a 7-byte character value.

SYSJMRID
contains the value of the JMRUSEID field of the JCT control block as mapped by the IEFAJMR macro. It is a 7-byte character value.

SYSUID
contains the value of the TSO userid that is associated with the SAS session, regardless of whether the session is a batch job, a remote connect session, a SAS/SESSION connection, or a TSO session. SAS obtains this value from the ACEEUSRI field of the ACEE control block.

Four additional automatic macro variables that are available only under OS/390 can be used to help diagnose failures in dynamic allocation. Their values are updated each time SAS does a dynamic allocation as a result of a FILENAME or LIBNAME statement (or their equivalent DATA step or SCL functions). They are undefined until the first dynamic allocation is performed. These macro variables are:

SYS99ERR
contains the error reason code that was returned in the SVC 99 request block.

SYS99INF
contains the information reason code that was returned in the SVC 99 request block.

SYS99MSG
contains the text of the message that is associated with the reason code.

SYS99R15
contains the return code that was returned in R15 from SVC 99.


Names to Avoid When Defining Automatic Macro Variables

When you define automatic macro variables, do not use names taken up by OS/390 reserved words, (see Reserved OS/390 DDnames) names of SAS system files (see Differences between the WORK and USER Libraries ), or names beginning with &SYS. The prefix &SYS has been reserved for future use.


Chapter Contents

Previous

Next

Top of Page

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