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.
When the code for the command program gets control by a direct branch, the contents of the registers are:
Before the program returns to the caller, it should place the return code it wants reflected into the CICPARMS RETCODE field.
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.