REXXTDLI calls and REXXIMS commands
To issue commands in the IMS adapter for REXX environment, you must first address the correct environment. Two addressable environments that are provided with the IMS adapter for REXX are REXXDLI and REXXIMS.
The terms command and call can be used interchangeably when explaining the REXXTDLI environment. However, the term command is used exclusively when explaining the REXXIMS environment. For consistency, call is used when explaining DL/I, and command is used when explaining REXX.
- REXXTDLI
- Used for standard DL/I calls, for example
GUandISRT. The REXXTDLI interface environment is used for all standard DL/I calls and cannot be used with REXX-specific commands. All commands issued to this environment are considered to be standard DL/I calls and are processed appropriately. AGUcall for this environment could look like this:Address REXXTDLI "GU MYPCB DataSeg" - REXXIMS
- Used to access REXX-specific commands (for example,
WTOandMAPDEF) in the IMS adapter for REXX environment. The REXXIMS interface environment is used for both DL/I calls and REXX-specific commands. When a command is issued to this environment, IMS checks to see if it is REXX-specific. If the command is not REXX-specific, IMS checks to see if it is a standard DL/I call. The command is processed appropriately.The REXX-specific commands, also called extended commands, are REXX extensions added by the IMS adapter for the REXX interface. AWTOcall for this environment could look like this:Address REXXIMS "WTO Message"
On entry to the scheduled EXEC, the default environment is z/OS®. Consequently, you must either use ADDRESS REXXTDLI or ADDRESS REXXIMS to issue the IMS adapter for REXX calls.
Environment determination
- Use the z/OS SUBCOM command and specify either the
REXXTDLI or REXXIMS environments. The code looks like this:
Address z/OS 'SUBCOM REXXTDLI' If RC=0 Then Say "IMS Environment is Available." Else Say "Sorry, no IMS Environment is here." - Use the PARSE SOURCE instruction of REXX to examine the address space name (the 8th word). If it
is running in an IMS environment, the token will have the value
IMS. The code looks like this:
Parse Source . . . . . . . Token . If Token='IMS' Then Say "IMS Environment is Available." Else Say "Sorry, no IMS Environment here."
Related reading: For general information on addressing environments, see TSO/E Version 2 Procedures Language MVS/REXX Reference.