Command arguments passed to assembler programs
REXX/CICS command programs can 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.
Alternatively, if the DEFCMD or DEFSCMD command specifies the CICSLOAD option, 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 perform a direct branch entry (by an assembler BASSM instruction) into the program. It is recommended that these assembler programs return control by using an assembler BSM instruction so that the correct mode switching (if any) occurs.
The following information describes the contents of the registers when an assembler language command program gets control, and 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.