IVPREXX sample application

The IVPREXX exec is a front-end generic exec that is shipped with IMS as part of the IVP. It runs other execs by passing the exec name to execute after the TRANCODE (IVPREXX). For the latest version of the IVPREXX source code, look for the IVPREXX member in the IMS.ADFSEXEC distribution library.

To use the IVPREXX driver sample program in a message-driven BMP or IFP environment, specify IVPREXX as the program name and PSB name in the parameter list of the IMS region program. Specifying IVPREXX loads the IVPREXX load module, which is a copy of the DFSREXX0 front-end program. The IVPREXX program loads and runs an EXEC named IVPREXX that uses message segments sent to the transaction as arguments to derive the EXEC to call or the function to perform.

Interactions with IVPREXX from an IMS terminal are shown in the following examples:

IVPREXX example 1

Entry:
   IVPREXX execname
or
   IVPREXX execname arguments
Response:
   EXEC execname ended with RC= x

IVPREXX example 2

Entry:
   IVPREXX LEAVE
Response:
   Transaction IVPREXX leaving dependent region.

IVPREXX example 3

Entry:
   IVPREXX HELLOHELLO
Response:
   One-to-eight character EXEC name must be specified.

IVPREXX example 4

Entry:
   IVPREXX
or
   IVPREXX ?
Response:
   TRANCODE EXECNAME <Arguments> Run specified EXEC
   TRANCODE LEAVE                Leave Dependent Region
   TRANCODE TRACE level          0=None,1=Some,2=More,3=Full
   TRANCODE ROLL                 Issue ROLL call

When an EXEC name is supplied, all of the segments it inserts to the I/O PCB are returned before the completion message is returned.

REXX return codes (RC) in the range of 20000 to 20999 are usually syntax or other REXX errors. Check the z/OS® system console or region output for more details.

Related reading: For more information about REXX errors and messages, see z/OS TSO/E REXX Reference.

Stopping an infinite loop
To stop an EXEC that is in an infinite loop, you can enter either of the following IMS commands from the master terminal or system console:
   /STO REGION p1 ABDUMP p2
   /STO REGION p1 CANCEL

In these examples, p1 is the region number and p2 is the TRANCODE that the EXEC is running under. Use the /DISPLAY ACTIVE command to find the region number. This technique is not specific to REXX EXECs and can be used on any transaction that is caught in an infinite loop.