transferToProgram element

A transferToProgram element of a linkage options part specifies how a generated Java™ or COBOL program transfers control to a particular program and ends processing, as occurs when the originating program uses the transfer to program statement.

The element includes these properties:
If you are generating COBOL code, you can avoid specifying a transferToProgram element when the target program is generated with VisualAge® Generator or (in the absence of an alias) with EGL. The default behavior is as follows:

A special concern arises when you are developing COBOL code that runs outside of CICS. The runtime simulation of CICS behavior means that you must specify the initial program in the run unit as the one from which any transfer occurs.

Consider the case of Program01 transferring to Program02, which in turn transfers to Program03, assuming that each transfer is of type transfer to program. When you are generating Program01 (unless you accept the default behavior), your linkage options part must include a pair of transferToProgram elements to indicate that the following transfers occur: In the previous situation, if Program02 can also be used as the first program in another run unit, your linkage options part must include a different transferToProgram element when you are generating Program02. The purpose in that case is straightforward, to transfer control from Program02 to Program03.

If Program02 is an EGL program and Program03 is not, the default settings are inappropriate, and you must specify the transferToProgram element that is involved in transferring control from Program01 to Program03.