Command Arguments Passed to Assembler Programs

In addition to the REXX language, REXX/CICS command programs may be written in assembler language. Assembler language routines must exist in a CICS program properly defined (for example, by using the CEDA DEFINE PROGRAM command). These programs are invoked by an EXEC CICS LINK if the CICSLINK option was specified on the DEFCMD or DEFSCMD commands. If the DEFCMD or DEFSCMD, on the other hand, specifies the CICSLOAD option, then the program is EXEC CICS LOADed by the first command that causes it to be invoked for the current CICS task, and its load address is remembered. Any subsequent commands in the same CICS task that use this program performs a direct branch entry (by an assembler BASSM instruction) into the program. It is recommended that these assembler programs return control by an assembler BSM instruction so that the correct mode switching (if any) occurs.

The following describes the contents of the registers when an assembler language command program gets control, and it describes the parameters upon entry to these programs.

Entry Specifications when DEFCMD CICSLOAD is specified:

When the code for the command program gets control by a direct branch, the contents of the registers are:

Register 0
Unpredictable
Register 1
Address of the CICPARMS control block
Registers 2-12
Unpredictable
Register 13
Address of 18 fullword register save area
Register 14
Return address
Register 15
Entry point address

Before the program returns to the caller, it should place the return code it wants reflected into the CICPARMS RETCODE field.

Entry Specifications when DEFCMD CICSLINK is specified:

When the code for the command program gets control by an EXEC CICS LINK, the CICS Commarea contains the CICPARMS control block.

Before the program returns to the caller, it should place the return code it wants reflected into the CICPARMS RETCODE field.