Using The Sysvar Function - IBM TSO/E REXX User Manual

Table of Contents

Advertisement

v INVALID DATASET NAME, data-set-name:
v MISSING DATASET NAME
After a data set is available for use, you may find it useful to get more detailed
information. For example, if you later need to invoke a service that requires a
specific data set organization, then use the LISTDSI function. For a description of
the LISTDSI function, see "Using the LISTDSI Function" on page 120.
When you specify a fully-qualified data set, be sure to use two sets of quotation
marks as follows; one set to define a literal string to REXX and the other set to
indicate a fully-qualified data set to TSO/E.
x = SYSDSN("'proj5.rexx.exec'")
or
x = SYSDSN('proj5.rexx.exec'')
When you specify a data set that is not fully-qualified and begins with your prefix
(usually your user ID), you can use one set of quotation marks or none at all.
TSO/E adds your prefix to the data set name whether or not it is enclosed within a
set of quotation marks.
x = SYSDSN('myrexx.exec')
or
x = SYSDSN(myrexx.exec)
When you specify a variable that was previously set to a data set name, do not
enclose the variable in quotation marks. Quotation marks would prevent the data
set name from being substituted for the variable name.
variable = 'myrexx.exec'
x = SYSDSN(variable)
The following example uses the SYSDSN function together with the LISTDSI
function to test whether a data set exists and whether it is a partitioned data set:
DO FOREVER
END
The SYSDSN function can be used only in REXX execs that run in the TSO/E
address space.

Using the SYSVAR Function

The SYSVAR function retrieves information about MVS, TSO/E, and the current
session, such as levels of software available, your logon procedure, and your user
ID. The information retrieved depends on the argument specified.
To retrieve the information, use the SYSVAR function immediately followed by an
argument value enclosed in parentheses. For example, to find out the name of the
logon procedure of your current session, use the SYSVAR function with the
argument SYSPROC.
SAY 'Enter a Data Set Name'
PARSE UPPER PULL dsname
IF SYSDSN(dsname) ¬= 'OK' THEN ITERATE
FC = LISTDSI(dsname)
IF SYSDSORG ¬= 'PO' THEN ITERATE
SAY 'Okay: ' dsname 'is ' SYSDSORG
LEAVE
TSO/E External Functions
Chapter 10. Using TSO/E External Functions
127

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents