Program services

JCICS support for the CICS program control commands is described below:
Methods JCICS class EXEC CICS Commands
link() Program LINK
SetNextTransaction(), setNextCOMMAREA(), setNextChannel() TerminalPrincipalFacility RETURN
xctl() Program XCTL
  Not supported SUSPEND
LINK and XCTL
You can transfer control to another program that is defined to CICS using the link() and xctl() methods. The target program can be in any language supported by CICS.

If you use the xctl() method, a TransferOfControlException is thrown to the issuing program, even if it completes successfully.

RETURN
Only the pseudoconversational aspects of this command are supported. It is not necessary to make a CICS call simply to return; the application can simply terminate as normal. The pseudoconversational functions are supported by methods in the TerminalPrincipalFacility class: setNextTransaction() is equivalent to using the TRANSID option of RETURN; setNextCOMMAREA() is equivalent to using the COMMAREA option; while setNextChannel() is equivalent to using the CHANNEL option. These methods can be invoked at any time during the running of the program, and take effect when the program terminates.
Note: The length of the COMMAREA provided is used as the LENGTH value for CICS. This value may not exceed 32 500 bytes if the COMMAREA is to be passed between any two CICS servers (for any combination of product/version/release).