|
>>-MVSVAR(arg_name)--------------------------------------------><
MVSVAR returns information about MVS™, TSO/E, and the current session, such as
the symbolic name of the MVS system,
or the security label of the TSO/E session.
The MVSVAR function
is available in any MVS address
space.
The information returned depends on the arg_name value
specified on the function call. The following items of information
are available for retrieval: - SYSAPPCLU
- the APPC/MVS logical unit (LU) name
- SYSDFP
- the level of DFSMSdfp, a basic element of the operating system
- SYSMVS
- the level of the base control program (BCP) component of z/OS
- SYSNAME
- the name of the system your REXX exec is running on, as specified
in the SYSNAME statement in SYS1.PARMLIB member IEASYSxx
- SYSOPSYS
- the z/OS name,
version, release, modification level, and FMID
- SYSSECLAB
- the security label (SECLABEL) name of the TSO/E session
- SYSSMFID
- identification of the system on which System Management Facilities
(SMF) is active
- SYSSMS
- indicator whether SMS (storage management subsystem) is running
on the system
- SYSCLONE
- MVS system symbol representing
its system name
- SYSPLEX
- the MVS sysplex name as found
in the COUPLExx or LOADxx member of SYS1.PARMLIB
- SYMDEF
- symbolic variables of your MVS system
Note: For information about other system variables
see SYSVAR.
These items
of information will now be described one by one. - SYSAPPCLU
- the APPC/MVS logical unit (LU) name. The
LU name identifies the TSO/E address space, where your REXX exec is
running, as the SNA addressable unit for Advanced Program-to-Program
Communications (APPC). The LU name is obtained by using the APPC/MVS
Advanced TP Callable Services (ATBEXAI - Information Extract Service).
The LU name is returned as a character string. Trailing blanks
are truncated. A null string is returned if: - There is no APPC activity in the address space where the REXX
exec is running
- No LU name is provided by the APPC/MVS Advanced TP Callable Services
- SYSDFP
- the level of DFSMSdfp installed on your system.The
value returned is in the format cc.vv.rr.mm,
where cc is a code, vv the
version, rr the release number, and mm the
modification level. All values are two-digit decimal numbers.
The cc code
has one of these meanings:
- 00
- MVS/XA DFP
Version 2 or MVS/DFP Version
3 running with MVS/SP on MVS/XA or MVS/ESA.
- 01
- DFSMSdfp in DFSMS/MVS running
with MVS/SP on MVS/ESA or OS/390®.
- 02
- DFSMSdfp in OS/390 Version 2 Release 10,
or in z/OS® Version 1 Release
1 or z/OS Version 1 Release
2. All three releases returned "02.02.10.00".
- 03
- DFSMSdfp in z/OS Version 1 Release 3 or later.
Larger values for the cc code
represent later products.
- SYSMVS
- the level of the base control program (BCP) component of z/OS.
The
value returned is that of the CVTPRODN field in the communications
vector table (CVT), for example SP7.0.1. Trailing
blanks are removed.
The format of the value returned by SYSMVS
may change in future, but will remain the content of the CVTPRODN
field.
OS/390 Users: To
provide customers with the least disruptive change when changing from MVS/ESA SP 5.x to OS/390, the format of the CVTPRODN
field is maintained and contains SP5.3.0 for OS/390 Release 1. This is because
some products test byte 3 to see if it is "5", which indicates
that certain functions are available.
- SYSNAME
- the name of the system your REXX exec is running on, as specified
in the SYSNAME statement in SYS1.PARMLIB member IEASYSxx.
The
system name can be used in various ways: - In a multi-system global resource serialization
complex, the name identifies each system in the complex.
- The system also uses this value to uniquely identify the originating
system in messages in the multiple console support (MCS) hardcopy
log and in the display created by the DISPLAY R command.
- The value of SYSNAME is used as the name of the system log (SYSLOG).
- SYSOPSYS
- the z/OS name,
version, release, modification level, and FMID. For example,
/* REXX */
mvsstring = MVSVAR('SYSOPSYS')
say mvsstring
exit 0
may return a string of z/OS 01.01.00 JBB7713,
where z/OS represents
the product name, followed by a blank character, followed by an eight-character
string representing version, release, modification number, followed
by a blank character, followed by the FMID.
SYSOPSYS was introduced
after TSO/E Version 2 Release 5 with APAR OW17844. If you use this
variable in a environment earlier than TSO/E 2.5, or without the PTF
associated with APAR OW17844, the system returns a null string.
- SYSOSSEQ
- This variable returns the value from the ECVTPSEQ field of the
ECVT, which has the format nn vv rr mm (where nn = x'00' for OS/390, x'01' for z/OS). This value is referred to as the product
sequence number. It can be used to determine if the operating system
is at a suitable level for a desired function. Its value always increases
from one release level to the next regardless of the character release
identifier assigned to that release.
In the returned value, each
2 digit part of the ECVTPSEQ value is separated from the next by a
period. For example, '01.01.13.00' is returned for z/OS V1R13.
- SYSSECLAB
- the security label (SECLABEL) name of the TSO/E session where
the REXX exec was started. Trailing
blanks are removed.
Note: The use of this argument requires that RACF® is installed, and that security
label checking has been activated. If no security information is
found, the function returns a null string.
- SYSSMFID
- identification of the system on which System Management Facilities
(SMF) is active. The value returned is
as specified in SYS1.PARMLIB member SMFPRMxx on the SID statement.
Trailing blanks are removed.
Note that the value returned by
arguments SYSSMFID and SYSNAME can be the same in your installation.
See z/OS MVS Initialization and Tuning Reference for
more details on the SYSNAME and SID statement in member SMFPRMxx.
- SYSSMS
- indicator whether SMS (storage management subsystem) is running
on the system. The
function returns one of the following character strings:
- UNAVAILABLE
- Obsolete and should no longer occur. System logic error. Contact
your IBM® service representative.
- INACTIVE
- SMS is available on your system but not active.
- ACTIVE
- SMS is available and active, so your REXX exec can depend on it.
The following three arguments are in support
of a SYSPLEX configuration. They return information about the SYSPLEX
as stored in various members of SYS1.PARMLIB. The returned values
can be used, for example, to uniquely identify or build datasets or
other resources belonging to a specific system within the SYSPLEX.
- SYSCLONE
- MVS system symbol representing
its system name. It is a 1- to 2-byte shorthand
notation for the system name. The
value is obtained from SYS1.PARMLIB member IEASYMxx1. For example, if SYSCLONE(A1) is
specified in IEASYMxx, then
MVSVAR('SYSCLONE')
returns
a value of A1. A null string is returned if no MVS SYSCLONE ID is specified in IEASYMxx.
- SYSPLEX
- the MVS sysplex name as found
in the COUPLExx or LOADxx member of SYS1.PARMLIB. The returned value has a maximum
of eight characters. Trailing blanks are removed. If no sysplex name
is specified in SYS1.PARMLIB, the function returns a null string.
- SYMDEF,symbolic-name
- returns the value associated with
the symbolic-name defined in an IEASYSxx member of
SYS1.PARMLIB on a SYSDEF ... SYMDEF statement.
Or, symbolic-name can
also be one of the system static or dynamic symbols as defined in z/OS MVS Initialization and Tuning Reference.
For example, if SYMDEF(&SYSTEMA = 'SA') is specified
in IEASYMxx, then X = MVSVAR('SYMDEF','SYSTEMA')
returns
a value of SA. A null string is returned if the symbolic-name is
not specified in IEASYMxx and is not one of the standard static or
dynamic symbols defined by MVS.
You
can also retrieve the value for one of the MVS defined static or dynamic systems symbols.
For example: X = MVSVAR('SYMDEF','JOBNAME') /*Returns JOBNAME
BOB perhaps */
Refer
to z/OS MVS Initialization and Tuning Reference for
a discussion and list of the currently defined MVS static and dynamic symbols.
For example,
you can retrieve the IPL Volume Serial Name of your system using SAY MVSVAR('SYMDEF','SYMR1') /*may return 640S06
as IPL Vol. Ser. Name */
The
MVSVAR('SYMDEF',string) function goes through REXX substitution for string first, the result of which must be a
1-8 character symbolic-name specifying
the symbol that has been defined in the SYMDEF statement. Any other
values including REXX delimiters may cause unpredictable results.
Examples:
- This example shows how to retrieve the current operating system
level.
opersys = MVSVAR('SYSOPSYS')
- This example shows how to retrieve information about a SYSPLEX
configuration.
Assume your installation has defined, in member
SYS1.PARMLIB(IEASYM11), certain variables that are applicable on a
system wide basis. Assume further that one of them starts with the
string BOOK and is concatenated by the sysclone ID, for example SYMDEF(&BOOKA1='DIXI')
You
can obtain the value of this variable as follows. tempvar = 'BOOK'||MVSVAR('SYSCLONE') /* the result could be BOOKA1 */
/* where A1 is obtained as the */
/* result of MVSVAR('SYSCLONE') */
instvar = MVSVAR('SYMDEF',tempvar) /* the result could be DIXI if */
/* in IEASYM11 the statement */
/* SYMDEF(&DATASA1='DIXI') had been */
/*included by the system administrator */
Checking for Prerequisite Program Level
Several
of the MVSVAR arguments require a minimum prerequisite program level.
Running
on a downlevel release causes a syntax error accompanied by an error
message. If you do not have SYNTAX trap enabled, the REXX exec ends.
You may avoid termination of the REXX exec by testing for the proper
program level as shown in the following examples.
Example
1: Testing for Proper MVS Level: /*REXX*/
IF MVSVAR('SYSMVS') >= 'SP5.2.0' THEN
SAY MVSVAR('SYSCLONE') /* yes, we can use the SYSCLONE argument */
EXIT 0
Example 2: Testing for Proper DFP
Level: /*REXX*/
IF MVSVAR('SYSDFP') >= '00.03.03.00' THEN
SAY MVSVAR('SYSSMS') /* yes, we can use the SYSSMS argument */
EXIT 0
1 Introduced with MVS/ESA SP 5.2; provides
a mechanism to assign system substitution symbols names and values.
|