ADELIA |
VADELIA |
SADELIA |
WADELIA |
MADELIA |
(I/B) |
(I/B) (S) |
(B) (S) |
(I/B) (S) |
(I) (S) |
Section for use
All
Syntax
COMMIT
Description
This instruction is used whenever the application is in commitment control mode.
The opposite instruction is ROLL_BACK.
Access to an AS/400 file
This corresponds to the validation of updates on files defined in commitment control mode (COMMIT) since the last commitment.
To declare a file in "commitment control" mode, you have to modify the default generation options, specifying in the COMMIT column that commitment control is to be managed on the line for the relevant file.
When using the DEFINE_VIEW or VIEW (Visual Adelia) instructions to make the declaration, you must specify the COMMIT parameter.
Important note: The COMMIT instruction can be used in a program where no files are opened under commitment control mode.
See the corresponding IBM manual for more details on the use of the "commitment control" mode.
Access to an SQL table
This involves validating the updates made since the last commitment operation.
You must disable the "Ignore commitment control" mode; see Commitment Control and the 3GL Generation tab of the Environment attributes.
With the "Ignore commitment control" mode active, any updates are validated automatically and the COMMIT instruction is ignored.
With PC SQL and AS/400 SQL tables, any updates will be lost if the "Ignore commitment control" mode is disabled and the COMMIT instruction is not executed.
Note: With Windows server modules in Visual Adelia programs, any SQL updates will be validated if this instruction is used.
Access to a Btrieve file
Adelia does not handle Btrieve file logging. Any updates will be validated automatically.
Warning:
With ADELIA programs generated in C, this instruction is inactive.
With programs other than of Adelia type, this instruction is ignored by the generator if the "Ignore commitment control" mode is active (see the 3GL Generation tab of the Environment attributes).
Example
IF CONFIRM_CODE = 'Y'
COMMIT
ELSE
ROLL_BACK
END