REXX - Example
The following example shows how to convert the TOD EBCDIC value from a local variable such as LINE.OPRNOTE.n.TOD into a readable value:
/* */
/* A sample EXEC that uses the IPCS BLSUXTOD service to */
/* convert timer units. The result will be returned in */
/* Greenwich Mean Time. */
/* */
/* Example: */
/* */
/* D17D28A5165842CA yields 10/13/2016 17:15:28.399748 */
/* */
/*-----------------------------------------------------------*/
PARSE UPPER ARG EXECNAME TUNITS FILLER
TUNITS = X2C(TUNITS)
TIMESTAMP = COPIES(0,26) /* force result length=26 */
ADDRESS LINKPGM 'BLSUXTOD TUNITS TIMESTAMP'
SAY TIMESTAMP
EXIT
The following example is a REXX EXEC to add a calendar set that has two day entries and one time and period entry:
DROP CAL. /* DROP ALL STEM VARIABLES FIRST */
/* CALENDAR Definitions */
CAL.CALENDAR.SET.DAY.0 = '2'
CAL.CALENDAR.SET.TIME.0 = '1'
CAL.CALENDAR.SET.PERIOD.0 = '1'
CAL.CALENDAR.SET.DAY.1 = 'DLY'
CAL.CALENDAR.SET.DAY.2 = 'MON'
CAL.CALENDAR.SET.TIME.1 = 'KEN1 Test'
CAL.CALENDAR.SET.PERIOD.1 = 'FirstSh'
'TOMEXEC FUNCTION(ADD) STEM(CAL) CALSET(calset1) '
SAY 'TOMRC= 'TOMRC
SAY 'CAL.EXCEPT.0= 'CAL.EXCEPT.0
DO I=1 TO CAL.EXCEPT.0
SAY 'CAL.EXCEPT.'I' = 'CAL.EXCEPT.I
END
The following table lists variables (and example values) that can be set or assigned before issuing the TOMEXEC ADD and CHANGE functions and are returned after issuing the TOMEXEC GET function for sets.
Table 1. REXX stem variables and sample values: set ADD, CHANGE, or GET
REXX stem variable | Description of variable | Examples of values |
---|---|---|
SET.DESCR | Description of the set | TOM TEST SET 1 |
SET.STATUS | Status of the set | STOPPED |
SET.MEMBER.0 | Number of members in the set | 3 |
SET.MEMBER.n.NAME | Name of a member in the set | AAOVALN1 TOM OBJECT |
SET.MEMBER.n.TYPE | Type of the member in the set | OBJECT |
SET.MEMBER.n.SHORT | Short name for the member in the set | AAOVALN1 |
SET.USERPROP.0 | Number of user properties identified for this set | 2 |
SET.USERPROP.n.NAME | Name of the user property for this set | UPROP1 |
SET.USERPROP.n.VALUE | Value associated with the user property for this set | USER PROPERTIES VALUE 1 |
SET.PATTERN | Pattern for a layer set | SETNAME001 |
SET.OPRNOTE.0 | Number of operator command note entries | 2 |
SET.OPRNOTE.n.CMD | Command associated with operator note Only one note per command is kept for an set. When a particular command (i.e. STOP) is issued a second time with a note then the previous note for that command is overwritten. | STOP |
SET.OPRNOTE.n.USER | Specifies the user ID to be used to create the operator command note | PRDOPR1 |
SET.OPRNOTE.n.TOD | Date and time that operator command note was written in EBCDIC format | D17D28A5165842CA |
SET.OPRNOTE.n.TEXT | Text of operator command note | Stopped for end of day batch processing |
The following table lists variables (and example values) that can be set or assigned before issuing the TOMEXEC ADD and CHANGE functions and are returned after issuing the TOMEXEC GET function for system layers.
Table 2. REXX stem variables and sample values: system layer ADD, CHANGE, or GET
REXX stem variable | Description of variable | Examples of values |
---|---|---|
LINE.DESCR | Description of the system layer | VAL SYSLAYER1 |
LINE.DYNPROP | Dynamic propagation attribute | YES |
LINE.LAYEROBJECTS.0 | Number of layer objects in this system layer | 2 |
LINE.LAYEROBJECTS.n.NAME | Layer object name | VALLAYEROBJ1 |
LINE.LAYERSETS.0 | Number of layer sets in this system layer | 1 |
LINE.LAYERSETS.n.NAME | Layer set name | VALLAYERSET1 |
The following table lists variables (and example values) that can be set or assigned before issuing the TOMEXEC ADD and CHANGE functions and are returned after issuing the TOMEXEC GET function for sysplex layers.
Table 3. REXX stem variables and sample values: sysplex layer ADD, CHANGE, or GET
REXX stem variable | Description of variable | Examples of values |
---|---|---|
LINE.DESCR | Description of the sysplex layer | VAL PLEXLAYER1 |
LINE.DYNPROP | Dynamic propagation attribute | YES |
LINE.SYSLAYERS.0 | Number of system layers in this sysplex layer | 2 |
LINE.SYSLAYERS.n.NAME | System layer name | VALSYSLAYER1 |
The following table lists variables (and example values) that can be set or assigned before issuing the TOMEXEC ADD and CHANGE functions and are returned after issuing the TOMEXEC GET function for layer sysplexes.
Table 4. REXX stem variables and sample values: layer sysplex ADD, CHANGE, or GET
REXX stem variable | Description of variable | Examples of values |
---|---|---|
LINE.DESCR | Description of the layer sysplex | VAL LAYERPLEX1 |
LINE.SYSTEMS.0 | Number of systems in the sysplex | 2 |
LINE.SYSTEMS.n.NAME | System name | SJSC |
LINE.SYSTEMS.n.DESCR | System description | ATTACHED SYS2 |
LINE.SYSTEMS.n.CLONEID | System clone ID | SC |
LINE.SYSTEMS.n.LAYERID | System layer ID | 2 |
The following table lists variables (and example values) that can be set or assigned before issuing the TOMEXEC ADD and CHANGE functions and are returned after issuing the TOMEXEC GET function for calendar entries.
Table 5. REXX stem variables and sample values: calendar entries ADD. CHANGE, or GET
REXX stem variable | Description of variable | Examples of values |
---|---|---|
CAL.CALENDAR.DAY.DEFN | Definition for a calendar day entry | WED |
CAL.CALENDAR.TIME.DEFN | Definition for a calendar time entry | 093000153000 |
CAL.CALENDAR.PERIOD.DEFN | Definition for a calendar period entry | '1999010100000020080101235900' |
The following table lists variables (and example values) that can be set or assigned before issuing the TOMEXEC ADD and CHANGE functions and are returned after issuing the TOMEXEC GET function for calendar sets.
Table 6. REXX stem variables and sample values: calendar set ADD, CHANGE, or GET
REXX stem variable | Description of variable | Examples of values |
---|---|---|
CAL.CALENDAR.SET.DAY.0 | Number of calendar day entries in the set | 2 |
CAL.CALENDAR.SET.TIME.0 | Number of calendar time entries in the set | 1 |
CAL.CALENDAR.SET.PERIOD.0 | Number of calendar period entries in the set | 1 |
CAL.CALENDAR.SET.DAY.n | Name of calendar day entry in the set | DLY |
CAL.CALENDAR.SET.TIME.n | Name of calendar time entry in the set | KEN1 Test |
CAL.CALENDAR.SET.PERIOD.n | Name of calendar period entry in the set | FirstSh |
The following table lists variables (and example values) that can be set or assigned before issuing the TOMEXEC ADD and CHANGE functions and are returned after issuing the TOMEXEC GET function for calendar definition bases.
Table 7. REXX stem variables and sample values: calendar definition base ADD, CHANGE, or GET
REXX stem variable | Description of variable | Examples of values |
---|---|---|
CALBASE.DESCR | Description of a calendar definition base | VALCALBASE9 |
The following table lists variables (and example values) that are returned after issuing the TOMEXEC GET function for TOM system records.
Table 8. REXX stem variables and sample values: TOM system GET
REXX stem variable | Description of variable | Examples of values |
---|---|---|
line.name | TOM ID | TOM23A |
line.tomplex | TOMPLEX TOM is currently a member of | TOMPROD |
line.sysplex | SYSPLEX that TOM runs on | SYSPLEXA |
line.manage | TOM object management (NORMAL, SUSPEND) | SUSPEND |
line.eval | TOM evaluation requests (NORMAL, SUSPEND) | NORMAL |
line.jointod | Time of day when TOM PAS last joined the TOMPLEX | CDBDB93E9238EE53 |
line.endtod | Time of day when TOM PAS last joined the TOMPLEX | CDBDB93FA349BB63 |
line.ipltod | Time of day when TOM PAS ended | CDBD3E7837E12E5A |
line.sysname | IBM z/OS system name were TOM PAS runs | SYSA |
line.sysver | Version of IBM z/OS system where TOM PAS runs | 01 |
line.sysrel | Release of IBM z/OS system where TOM PAS runs | 13 |
line.sysmod | Modification level of IBM z/OS system where TOM PAS runs | 00 |
line.lparname | LPAR name where TOM PAS runs | SYSA |
line.cloneid | Clone ID of system where TOM PAS runs | SA |
line.smfid | SMF ID of system where TOM PAS runs | SYSA |
line.pasname | Product address space name | TOM23PAS |
line.casname | Coordinating address space name that the TOM PAS uses | MVICAS61 |
line.ipllevel | Target IPLLEVEL | NETWORK |
line.ipllvlo | IPLLEVEL status (ENABLED or DISABLED) | DISABLED |
line.actodb | Active object definition base | DEFAULT |
line.actcdb | Active calendar definition base | DEFAULTCAL |
line.regownr | Registry owner (YES or NO) | YES |
line.omode | Operation mode specified at TOM PAS start after IPL | DISASTER |
line.opernote.0 | Number of operator command note entries | 2 |
line.oprnote.n.cmd | Command associated with operator note Only one note per command is kept for an object. When a specific command (such as SHUTSYS) is issued a second time with a note, the previous note for that command is overwritten. | SYSTEM SHUTLOCK |
line.oprnote.n.user | Specifies the user ID to be used to create the operator command note | PRDOPR1 |
line.oprnote.n.tod | Date and time that operator command note was written in EBCDIC format | D17D28A5165842CA |
line.oprnote.n.text | Text of operator command note | System Shutdown |
line.AOSSID | SSID of the MainView AutoOPERATOR PAS that the TOM PAS uses | AOSS |
line.rgydsn | Registry data set name in use by the TOMPLEX | TOM23.TOMPROD.REGISTRY |
line.status | TOM current status (INACTIVE, INITIALIZING, READY, TERMINATING) | READY |