ADELIA |
|
|
|
|
(I) |
|
|
|
|
Section for use
All
Syntax
EXECUTE TransactionNum
Description
This instruction calls a transaction TransactionNum. It is similar to the PROCESS instruction, but once the called transaction is completed (TERMINATE instruction), control returns to the routine following the EXECUTE instruction.
Note: You can only exit a transaction that has been called with EXECUTE, with a TERMINATE instruction.
A transaction called by the EXECUTE instruction must have:
either a TERMINATE instruction: control will return to the routine following the EXECUTE instruction,
or a RETURN instruction: the program ends without freeing resources.
The only PROCESS instructions which may appear in transactions called by EXECUTE are those which concern the transaction itself.
To call other transactions from within a transaction called by EXECUTE, you must also use the EXECUTE instruction.
Note: A transaction called by EXECUTE cannot use the PROCESS instruction for another transaction other than itself.
Example
1. Call DSPCUS program and select customers whose name begins by the character H.
DSPCUS |
Display customer file |
|
03/03/02 |
|
|
|
11:19:02 |
|
|
|
|
Display names starting with...: H_____________________________ |
|||
Options : 1 : display detail |
|||
|
|||
Opt |
Customer name |
City |
|
F3=Exit |
DSPCUS program: first transaction (screen 1)
2. Listing of the customers corresponding to the search criterion.
DSPCUS |
Display customer file |
|
03/03/02 |
|
|
|
11:19:46 |
|
|
|
|
Display names starting with...: H_____________________________ |
|||
Options : 1 : display detail |
|||
|
|||
Opt |
Customer name |
City |
|
1 |
HARDIS CORPORATION |
SCHAUMBURG, ILL (USA) |
|
_ |
HARDIS INTERNATIONAL |
GRENOBLE (FRANCE) |
|
1 |
HARDIS PARIS |
COURBEVOIE (FRANCE) |
|
_ |
HARDIS U.K. |
LONDON (U.K.) |
|
_ |
HARDIS MEXICO |
MEXICO D.F.(MEXICO) |
|
|
|||
F3=Exit |
DSPCUS program: first transaction (screen 2)
3. Select several customers and, for each one, display a screen containing the associated information.
First customer selected:
DSPCUS |
Display customer detail |
03/03/02 |
|
|
11:20:54 |
Customer code |
: F380000001 |
|
Customer name |
: HARDIS CORPORATION |
|
Address 1 |
: 1501 Woodfield Drive |
|
Address 2 |
: Suite 100 South |
|
Zip code |
: 60173 |
|
City |
: SCHAUMBURG, ILL (USA) |
|
Phone number |
: (708) 605 0630 |
|
|
||
Contact name |
: C. HYDE |
|
Representative code |
: 01 JERRY L |
|
Payment code |
: AE Amer. exp |
|
Sales value |
: 956,300.00 |
|
|
||
F3=Exit F6=Print sales F12=Cancel |
DSPCUS program: second transaction (screen 1)
Second customer selected:
DSPCUS |
Display customer detail |
03/03/02 |
|
|
11:21:17 |
|
||
Customer code |
: F920000001 |
|
Customer name |
: HARDIS PARIS |
|
Address 1 |
: 40, RUE DU MOULIN DES BRUYERES |
|
Address 2 |
: |
|
Zip code |
: 92400 |
|
City |
: COURBEVOIE (FRANCE) |
|
Phone number |
: (33) 47.68.55.33 |
|
|
|
|
Contact name |
: C. LEBLANC |
|
Representative code |
: 04 P. SIMON |
|
Payment code |
: TC Trav. Ch. |
|
Sales value |
: 2,351,500.00 |
|
|
||
F3=Exit F6=Print sales F12=Cancel |
DSPCUS program: second transaction (screen 2)
The model corresponding to this case reads as follows:
PROCESS 01
*********************
TRANSACTION 01
*********************
IF *F03
TERMINATE
END
VERIFY 01 |
Runs the VERIFICATION 01 section |
PROCESS 01
*********************
TRANSACTION 02 |
Beginning of transaction 2 |
IF *F12
TERMINATE |
Returns to line after EXECUTE 02 |
PROCESS 02
*********************
INITIALIZATION 01
*********************
MANAGE_SFL 1
PRESENT CUST_SFLE
UPD_SFL
END_MANAGE_SFL
*********************
VERIFICATION 01
*********************
MANAGE_SFL 1
IF OPTION = '1'
INITIALIZE |
02 Runs INITIALIZATION 02 |
EXECUTE |
02 Runs TRANSACTION 02 |
OPTION = *BLANK
END_MANAGE_SFL
**********************
INITIALIZATION 02
**********************
CHAIN CUSTOMERS
PRESENT CUSTOMERS
CHAIN SALESPERSONS
PRESENT SALESPERSONS
CHAIN PAYMENTS
PRESENT PAYMENTS
See also the list of 4GL instructions by topic
↑ Top of page Copyrights Ι ©Hardis Group 2025 - Any partial or total reproduction of the content, not expressly authorized by Hardis Group, is strictly prohibited.