Links to another program expecting return.
LINK passes control from an application program that is at one logical level to an application program that is at the next lower logical level. The linked-to program can be on a local or a remote system. If the program is local, CICS loads it.
A remote program can be defined as such in its Program Definitions (PD) entry, or by using the SYSID option on the LINK command. For a remote program, CICS ships the link request to the remote region. This is referred to as a Distributed Program Link (DPL).
When the RETURN command is executed in the linked-to program, control is returned to the program that is initiating the linkage at the next sequential executable instruction.
The following example shows how to request a link to an application program called PROG1:
EXEC CICS LINK PROGRAM('PROG1')
The linked-to program operates independently of the program that issues the LINK command with regard to handling conditions, attention identifiers, and abends.
Transfers program control.
XCTL transfers control from one application program to another at the same logical level. The program from which control is transferred is released; the program to which control is transferred is loaded. The XCTL command cannot be used to call programs in any language other than COBOL, C, C++, or PL/I.
The following example shows how to request a transfer of control to an application program called PROG2:
EXEC CICS XCTL PROGRAM('PROG2')
We do CALL to another program and we do want to return,and we use it if we need to pass and return more information than what COMMAREA is holding by the "USING" option in the CALL.
Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!