Basic Structure of REXX Running Under CICS

REXX/CICS support provides a main interface program named CICREXD which is used to load and issue REXX execs within a CICS region. Each REXX exec runs under a separate CICS task. Any nested REXX execs run under the CICS task of the parent exec.

REXX Exec Invocation

Note:
A utility called REXXTRY (CICRXTRY exec) is provided with REXX/CICS that allows the interactive execution of REXX instructions and REXX/CICS commands. To invoke this utility, enter the REXX/CICS transaction identifier associated with CICRXTRY without any operands.

Where Execs Execute

REXX/CICS execs are executed as part of the CICS task that issues them, within the CICS region. The REXX interpreter is fully reentrant and runs above the 16 megabyte line (AMODE=31, RMODE=ANY).

Locating and Loading Execs

The following rules are used to locate and load an exec into storage so it can be started:

  1. Execs loaded into storage using EXECLOAD are searched and if the exec is found, the EXECLOADed copy is used.
  2. The user's current RFS directory, as defined by the REXX/CICS CD command, is searched. If found, the exec is loaded and started.
  3. The user's path, as defined by the REXX/CICS PATH command, is searched. If found, the exec is loaded and started.
  4. If the user is an authorized user, VSE Librarian sublibraries specified on the SETSYS AUTHCLIB command are searched. If the exec is found, it is loaded and started.
  5. VSE Librarian sublibraries specified on the SETSYS AUTHELIB command are searched. If the exec is found, it is loaded and started.
  6. Finally, members with a member type of PROC in sublibraries defined in the LIBDEF PROC search chain for the CICS TS partition are searched.

Editing Execs

REXX execs can be edited using the supplied REXX/CICS editor. Also, if REXX/CICS execs reside in a VSE Librarian member, they can be edited using other editors such as the librarian member edit component of DITTO.

REXX File System

Execs can be stored as members in the VSAM-based REXX File System (RFS), provided with REXX/CICS, or in VSE librarian members with a member type of PROC.

Note:
If the file identifier you specified for invoking an exec does not include a file type extension, then only RFS file identifiers with a file type of EXEC are searched when you attempt to locate and issue the REXX exec. If the file identifier includes a file type extension, then only RFS files with a matching file type are searched (when you attempt to locate and run the exec).

Control of Exec Execution Search Order

The CD and PATH commands define the search order of user REXX libraries when you attempt to load an exec. After the current directory (set by the CD command) is searched, all directories specified with the PATH command are searched, then VSE sublibraries specified on the SETSYS AUTHCLIB and SETSYS AUTHELIB commands are searched, followed by VSE Librarian members with a member type of PROC in the LIBDEF PROC search chain for the CICS partition.

Adding User Written Commands

An exec may be defined so it can be invoked as a REXX/CICS command. The DEFCMD command is used to define REXX/CICS user commands. DEFCMD supports commands written in REXX as well as the standard CICS supported languages. For more information on the DEFCMD command, see section DEFCMD.