For details about the runtime behavior, see the “Compatibility” section in this topic.
The program that is the target is either generated by EGL or is considered to be externally defined. For details about how to indicate that the program is externally defined, see the description of the isExternal property in the next section.

If you are coding a transfer to transaction statement, the linkage part element is transferToTransaction and the attribute is externallyDefined. If you are coding a transfer to program statement, the linkage part element is transferToProgram and the attribute is linkType.
The next table shows the valid transfers to or from EGL-generated code.
| Transferring object | Target object |
|---|---|
| An EGL Java™ program that is outside of J2EE | An EGL Java program (non-J2EE) |
| An EGL Java program that is in a J2EE application client | An EGL Java program in the same J2EE application client |
| An EGL Java program in a J2EE web application | An EGL Java program in the same J2EE web application |
| An EGL CICS® COBOL program | An EGL CICS COBOL program |
| A non-EGL program that was written in any language and that runs under CICS | |
| An EGL z/OS® batch program | An EGL z/OS batch program |
| A non-EGL batch program, written in any language and running outside of CICS on z/OS | |
| A non-EGL CICS program in a given transaction | An EGL CICS COBOL program in the same transaction |
| A non-EGL CICS COBOL program in the same transaction | |
| CICS transaction, written in any language | CICS transaction, written in any language |
| An EGL-generated IMS/VS program in a given transaction | An EGL-generated IMS/VS program in the same transaction |
| IMS™ transaction, written in any language | IMS transaction, written in any language |
| An EGL program on IBM® i | An EGL COBOL program on IBM i |
| A non-EGL program, written in any language and running on IBM i | |
| A non-EGL program written in any language and running on IBM i | An EGL COBOL program on IBM i |
| A non-EGL program written in any language and running on IBM i |
To transfer from EGL-generated Java code to non-EGL-generated Java code, use one of the following mechanisms: an EGL external type, a Java access function, or vgLib.startTransaction.
EGL supports the use of a deferred switch, such that one transaction shows a form and, when the user submits that form, another transaction is invoked. For details, see “show.”
transfer to program com.CompanyB.CustomerPackage.processCustomer;
| Platform | Issue |
|---|---|
| Batch environments (z/OS main batch program, IMS BMP, or Java main text or main batch program) | The transfer to transaction statement
starts a program in the same run unit. Pre-transfer behavior depends
on the setting of the synchOnTrxTransfer build
descriptor option:
Transfers between a z/OS batch program and an IMS BMP program is not supported. EGL uses the OS XCTL macro to run a transfer from an IMS BMP to a program that was not generated by EGL or VisualAge® Generator. |
| CICS for z/OS | A transfer to program does
not cause a synchronization point unless a PSB is scheduled when the
transfer occurs and when one of the following situations is in effect:
EGL implements the transfer to program statement with the CICS XCTL command and uses the COMMAREA option of that command to pass the record. The data starts in the first byte of the CICS common area, and the maximum record length is 32763. A transfer to transaction statement commits recoverable resources, closes files, closes cursors, and starts a new transaction. The targetName in this case is a CICS transaction ID. EGL implements the statement with the CICS START command and uses the COMMAREA option of that command to pass the record. The record data starts in the first byte of the CICS common area, and the maximum record length is 32763. |
| IMS BMP | See the Batch environments row. |
| IMS/VS |
The transfer to transaction statement commits recoverable resources, closes files, closes cursors, and starts a new transaction. |
| Java | The transferToProgram and transferToTransaction elements of the linkage options part can provide the package name for the receiving program if the name is not provided through import statements or explicitly through code package names. Transfer to a non-EGL-generated program is not supported. |
| JSF | A transfer to transaction statement is not valid for page handlers; use the forward statement instead. |
| Rich UI | The transfer statement is not supported. |
| z/OS batch | See the Batch environments row. |