ADELIA |
|
|
|
|
(I/B) |
|
|
|
|
Warning: This instruction is only compatible with the Adelia version generating RPG or C.
Section for use
TRANSACTION, INIT_PGM
Syntax
TERMINATE
Description
In an interactive context
This instruction halts the transaction in progress.
If the transaction was called by the PROCESS instruction used in a TRANSACTION section, the program being run will halt, its resources will be freed, and a return to the calling program will take place.
If the transaction was called by the PROCESS instruction in any other section (at the beginning of a program), control will return to the program, immediately after the PROCESS instruction.
If the transaction was called by the EXECUTE instruction, control will return to the calling transaction immediately after the EXECUTE instruction.
If the instruction is placed in the INIT section of the program, it stops the current program, releasing the resources and returns to the calling program.
In a batch context
This instruction halts the program in progress, frees its resources, and returns to the calling program; see the LR end of program indicator concept of the RPG.
Note: When generating RPG and the RT end of program option has been selected at the generation level, the TERMINATE and RETURN instructions have the same effect.
Example
PROCESS 01
**********************
TRANSACTION 01
**********************
IF *F03
TERMINATE |
End of program |
END
VERIFY 01 Executes VERIFICATION 01
INITIALIZE 01
PROCESS 01
**********************
TRANSACTION 02 Beginning of transaction 2
**********************
IF *F12
TERMINATE |
Returns after line EXECUTE 02 |
END
PROCESS 02
**********************
VERIFICATION 01
**********************
MANAGE_SFL 1
IF ZW_OPTION = '1'
INITIALIZE 02 |
Executes INITIALIZATION 02 |
EXECUTE 02 |
Processes TRANSACTION 02 |
END
OPTION = *BLANK
END_MANAGE_SFL
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.