REXX for CICS TS: Command reference

Detailed reference information for all REXX for CICS® commands is provided. Return code information for all commands is returned after command execution in the special REXX variable RC.

You can use all the commands in this section with the command environment name REXXCICS. This is also the default. However, depending on how you define the command, you can use a more specific environment name (such as CICS) instead. If you need to reset the command environment because another command environment is in use, enter the following command before you issue the REXX command:
ADDRESS REXXCICS
REXX for CICS supports all EXEC CICS commands, except for the following:
  • System Programming Interface (SPI) commands
  • Handle Condition
  • Handle Aid
  • Handle Abend
  • Ignore Condition
  • Push
  • Pop
The syntax for CICS commands under REXX for CICS is documented in Application development reference. Mapping between the existing EXEC CICS command definitions with the REXX commands is as follows:
  • Use CICS as the prefix for CICS commands, rather than EXEC CICS.
  • All data value fields can be specified as a literal character string or as a REXX variable name.
  • All data area fields can be specified as a REXX variable name, which is either the source or the target for the intended data.
  • Do not use the same REXX variable as both the source and target fields on a CICS command. If you do this, the result of the command execution will be unpredictable.
  • Whenever you do not specify a LENGTH option, the length is automatically determined from the length of the related REXX variable or character string.
  • When using the CICS ENQ command from REXX for CICS, use the LENGTH parameter, or unpredictable results might occur.
  • NOHANDLE is automatically specified for all CICS commands. The EIBRESP value from the execution of each command is returned in the REXX special variable RC. Also, EIB fields are placed in REXX variables DFHEIBLK, EIBRESP, EIBRESP2, and EIBRCODE.
  • For an explanation of the return code values, see Application development reference. For information on return codes with negative values, see REXX return codes.

Example of EXEC CICS to REXX command mapping

  • Non-REXX:
    EXEC CICS XCTL PROGRAM('PGMA') COMMAREA(COMA) LENGTH(COMAL)
  • REXX:
    "CICS XCTL PROGRAM('PGMA') COMMAREA(COMA)"
Note: The EXEC CICS READ, WRITE, and DELETE commands are implemented by default as REXX authorized commands, to control their use. See REXX for CICS TS: Authorized commands and authorized command options and to Security.