Program services

JCICS supports the CICS® program control commands; LINK, RETURN, and INVOKE APPLICATION.

For information about tools that allow Java programs to access existing CICS application data, see Interacting with structured data from Java.

Table 1 lists the methods and JCICS classes that map to CICS program control commands.
Table 1. Relationship between methods, JCICS classes, and CICS commands
EXEC CICS Commands JCICS class JCICS methods
LINK Program link()
RETURN TerminalPrincipalFacility setNextTransaction(), setNextCOMMAREA(), setNextChannel()
INVOKE APPLICATION Application invoke()
LINK
You can transfer control to another program that is defined to CICS by using the link() method. The target program can be in any language that is supported by CICS.
RETURN
Only the pseudoconversational aspects of this command are supported. It is not necessary to make a CICS call to return; the application can 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.
INVOKE
Allows invocation of an application by naming an operation that corresponds to one of its program entry points, without having to know the name of the application entry point program and regardless of whether the program is public or private.
Note: The length of the COMMAREA provided is used as the LENGTH value for CICS. This value should not exceed 24 KB if the COMMAREA is to be passed between any two CICS servers (for any combination of product/version/release). This limit allows for the COMMAREA and space for headers.