Documentation >
MAC-PAC Reference and Help >
Technical Support >
Key Concepts and Procedures >
Recovery Management >
Online Programs with No More Than 1,024 Updates and Multiple Modes
Online Programs with No More Than 1,024 Updates and Multiple Modes
Online programs that require more than 1 but no more than 1,024 updates per transaction and that run in multiple modes use a combination of the Commitment Control and Journaling facilities of the operating system. The following changes are required in both the RPG and CL programs that compose the job stream.
In the CL program:
· The CL program determines whether the RPG program is to be run in off- line mode. If so, the send journal entry (SNDJRNE) command is issued before the program call. This command will send a begin sync point (BE) record to the journal to mark the beginning of the transaction.
· Regardless of the processing mode, a begin commitment control command (BGNCMTCTL) is issued immediately before the program call. This activates the Commitment Control environment. An abort flag (ABTFLG) parameter is then added to the program call. This parameter will be turned on in the RPG program if the program ends abnormally.
· An end commitment control command (ENDCMTCTL) is issued after the program call. This deactivates the Commitment Control environment. This command is also placed in the error processing subroutine of the CL program. This command is followed by a check of the abort flag.
· If the program completes normally and is running off-line, an end sync point (EN) record is sent to the journal to mark the end of the transaction.
In the RPG program:
· A KCOMIT is added to the specifications for each update file that is being journaled. This keyword informs the operating system that the file is being used in a Commitment Control environment.
· Within the RPG code, COMIT statements are added in key places. These places are chosen so that all pertinent updates are contained within the commitment boundary. Because the operating system imposes a limit of 1,024 updates, these places must be chosen carefully.
· The abort flag parameter (ABTFLG) is added to the *ENTRY parameter list. The definition for this parameter is placed with the other work field definitions in housekeeping. The processing for setting on the abort flag is placed in the system error subroutine (ZSYSER), after the print file for the System Error Report (CT010X) has been closed.
Programs
IC120CLP2
|
IC190CLP2
|
IC130CLP2
|
OP125CLP
|
IC130CLP3
|
OP510CLP
|