Purpose
Passes control to a specified dialog at the same level in the application structure.
Syntax
►►─── TRANsfer ───┬────────────┬── to dialog-name ─── . ──────────────────────►◄ └─ NOFinish ─┘
Parameters
Specifies that the current run unit is to be extended.
Either the name of a variable data field that contains the dialog name to which control passes or the dialog name itself, enclosed in single quotation marks.
The load module for the named dialog must be stored in the data dictionary.
Usage
Considerations
Examples
The following examples use the TRANSFER statement to pass control to a dialog at the same level.
Example 1: Using the dialog name
In Example 2 of Application Thread, dialog UPDATEO passes control to dialog ADDORDR by means of the following statement:
TRANSFER TO 'ADDORDR'.
Example 2: Using a variable data field to transfer control
In this example, control passes either to dialog ADDORDR or to dialog ORDCOUNT, depending on the outcome of the OBTAIN command:
OBTAIN NEXT ORDOR WITHIN CUST-ORDER.
IF DB-END-OF-SET
THEN
MOVE 'ADDORDR' TO NEXT-DIALOG.
ELSE
MOVE 'ORDCOUNT' TO NEXT-DIALOG.
TRANSFER TO NEXT-DIALOG.
|
Copyright © 2014 CA.
All rights reserved.
|
|