Restore working storage
The start of the working storage area that
AR/CTL
saves during checkpoint processing and can restore at restart is the beginning address of working storage.
AR/CTL
determines the end of the working storage area to save and restore as follows:
It searches for the following 30-byte AR/CTL constant that you may code in the program:
01 FILLER PIC X(30) VALUE'** CHKP AREA END FOR AR/CTL **'- If the AR/CTL constant is not present in the program and the program uses Db2, AR/CTL searches for the beginning of Db2 generated areas, as indicated by the INCLUDE SQLCA statement, and stops restoring storage at this point (Db2 generated areas are not restored, and no other storage after the statement is restored). The AR/CTL constant should not follow the INCLUDE SQLCA statement.
- If the AR/CTL constant is not present and if the program does not use Db2, the end of working storage is as constructed by COBOL.
You may want to use the AR/CTL constant if program changes may ever be necessary between cold start of the program and restart (or between restart and another restart). You could then add fields after the point marked by the constant. The length of the working storage saved during the checkpoint processing and restored at restart does not change between abend and restart. You can also use the constant to limit the amount of working storage that is saved at each checkpoint.
Panel field | Restore working storage |
|---|---|
Keyword | RESTOREwsat |
Values | Set one of the following values: |
PGMSTART | Restore working storage at the beginning of the Procedure Division. |
FILEOPEN | Restore working storage at open of the file specified with the Trigger QSAM/VSAM DDname option. |
CRSROPEN | Restore working storage at open of the Db2 cursor specified with the Trigger DB2 Cursor Name option. This value is valid only if you have AR/CTL for Db2. |
FRSTFLEI | Restore working storage at first I/O request for the file specified with the Trigger QSAM/VSAM/GSAM DDname option. If this ddname describes a VSAM data set,FRSTFLEI is valid only if you have AR/CTL for VSAM. |
FRSTCOMM | Restore working storage at the first Db2 commit issued by the application program. The application program must issue at least one Db2 commit. Do not use this value if you set the Automatic Checkpoints option to Y. FRSTCOMM is valid only if the application program is running in a Db2 environment and using AR/CTL for Db2. |
FRSTPCBR | Restore working storage when the application program issues the first IMS call against an IMS program communication block (PCB). This value is valid only if the application program is running in an IMS environment and using AR/CTL for IMS. |
BYPASSWS | Do not restore working storage. |
Default | PGMSTART |
AR/CTL support to Db2® coprocessor for Auto Checkpoint and Auto Restart
To use the Db2® coprocessor with Auto Checkpoint and Auto Restart functionality, you must add the 32-byte AR/CTL constant 01 FILLER PIC X (32) VALUE '** CHKP AREA START FOR AR/CTL **' at the beginning of the program's working storage. This makes sure that the Db2 generated areas, which are included at the start of working storage when using the Db2® coprocessor, are not restored. The 32-byte START AR/CTL constant works only in conjunction with the 30-byte END AR/CTL constant. If the 30-byte END AR/CTL constant is not present in the code, the 32-byte START AR/CTL constant will not be in effect, it is ignored.