DB2 cursor repositioning
A major problem encountered in the DB2 checkpoint/restart environment is cursor repositioning at restart time. AR/CTL can perform repositioning automatically for the DB2 cursors used by an application program. After an abend, cursor position (the point where the application program was processing) is lost. If you do not use AR/CTL automatic cursor repositioning, at restart the application program must reestablish the cursor position at the last completed checkpoint. AR/CTL for DB2 offers the following methods for performing automatic DB2 cursor repositioning; these methods are implemented externally to the application program and require no program changes:
COLUMN | In the cursor repositioning record, you define one or more columns from the cursor. The columns specified must create a unique key for the cursor row. As each fetch cursor request is performed, AR/CTL retains the data from these columns for checkpoints and uses the data at restart to locate the correct row during the first fetch cursor. |
|---|---|
COUNT | AR/CTL maintains a count of fetch cursor operations and, at restart, issues fetches until it reaches the correct row within the cursor. This method is useful if no rows are added to or deleted from the cursor before the cursor position at the last checkpoint. |
To use automatic DB2 cursor repositioning, you must have AR/CTL for DB2. For more information, see Reference.