CICS Programs execution from another program

CICS Send Control CICS Call Statement

Advertisements


There are three ways of executing the program in CICS environment.

  1. By entering the Transaction
  2. Called by other program
  3. By Using LOAD command

When transaction triggered in CICS region, the associated program will start executing.

Called by the other program, will start executing of sub program and will discuss the same below.

By using the LOAD command, program execution will start at remote terminal and will discuss the same below.

How the programs will call(start executing) other programs in CICS environment?

Before discussing about the calling of programs, let’s discuss about how the programs calling structure will be in CICS region.

The programs which will take the control from CICS region during the execution will be declared in PCT table. These will act as a first level in programs calling structure of CICS region.

The programs calling from other programs will be declared in PPT table and will act as second level in programs calling structure of CICS region.

There are actually in three ways one program calls another program in CICS environment.

• CALL

• LINK

• XCTL

CALL:

CALL command is very similar to the call of other programs in Cobol.

If the CALL is used to call the subprogram, then the load module will be attached to the calling module.

For the programs used in CALL statement doesn’t require any PPT entries.

If the subprogram modified, then the calling program required to be recompile hence CALL will use the static calling of the sub programs.

Static calling was not allowed in CICS environments.

CALL statement can be explained here.

LINK:

LINK is used to call the other programs in CICS environment.

When the LINK is coded in the program, the calling program expected the control back when the RETURN or GOBACK executed in called program.

Control will return to the calling program regardless of the programs calling structure. i.e. control will return to the calling program, even though the calls happened at same level of programs.

LINK passes the program from one logical level to another level which is the next lower logical level.

LINK statement can be explained here.

XCTL:

XCTL is used to call the other programs in CICS environment but it won’t expect the control back to the calling program.

When the XCTL is coded in the program, the calling program will not receive the control back.

Instead of returning the control back, it will return the control to the next upper level.

If no upper level existed, the control will return to the CICS.

If the subprogram modified, then the calling program doesn’t required to be recompile hence XCTL will use the dynamic calling of the sub programs.

Subprograms called using LINK needs PPT entry in CICS region.

XCTL statement can be explained here.


If any questions on the above, post your queries on CICS Discussion forum


CICS Send Control CICS Call Statement

Advertisements