Program Control


A transaction may execute several programs in series to complete its work. The program definition contains one entry for one program used by any application in the CICS system.

CICS applications are conventionally run by submitting a transaction request. Transaction execution consists of running one or more application programs that implements the required function.

CICS uses the information recorded in the transaction definition to establish the correct execution environment and starts the first program execution. The first program may pass control to any other program from the list of installed program definitions.

The application name referred in a program control command must have been defined as a program to CICS. Program control commands can be used as below –

  • One application program can link to another program, with return to the requesting program with LINK command. The COMMAREA, CHANNEL, and INPUTMSG options of this command allow data to be passed to the requested application program.
  • One application program can link to another program in a separate CICS region, with return to the requesting program with LINK command. The COMMAREA or CHANNEL option of this command allows data to be passed to the requested application program. This is referred to as distributed program link (DPL). INPUTMSG and INPUTMSGLEN options can't be used with LINK command when using DPL.
  • Control can be transferred from one application program to another, with no return to the requesting program with XCTL command. The COMMAREA, CHANNEL, and INPUTMSG options of this command allow data to be passed to the requested application program. INPUTMSG and INPUTMSGLEN options can't be used with an XCTL command when using DPL.
  • Control can be returned from one application program to another or to CICS with RETURN command.
    The COMMAREA, CHANNEL and INPUTMSG options of this command allow data to be passed to a newly initiated transaction. INPUTMSG and INPUTMSGLEN options can't be used with a RETURN command when using DPL.
  • Application program, table or map can load into main storage using LOAD command.
  • Previously loaded application program, table or map can be deleted from main storage using RELEASE command.
  • COBOL CALL is used when calling the subprogram more than once.