Version 2.3.1
 —  Interfaces  —

Recovery and Restart Procedures

This document covers the following topics:


Introduction

This section describes how the Adabas Bridge for DL/I (ADL) handles DL/Icheckpoint calls and, in the case of an abnormal end to a program, how the database can be recovered and the application program restarted.

Note that the recovery and restart logic and procedures for Natural applications or programs using direct Adabas calls are not affected by ADL.

In DL/I, an application program may set checkpoints using the CHKP call. This results in the confirmation of all changes to the database made by the program up to this point. In addition, under z/OS, the XRST routine allows the use of "symbolic checkpointing", with which user data may be saved for each checkpoint. These data can later be used to restart the program, should it have terminated abnormally.

The ADL reproduces the full functionality of the DL/I XRST and CHKP calls and thus provides complete restart and recovery capabilities.

Adabas provides two basic methods of checkpointing:

Both the ET and C1 checkpoint methods are used by ADL.

Top of page

Extensions and Restrictions

Symbolic checkpointing is also possible under z/VSE, thus allowing full recovery/restart capabilities.

The following restrictions apply to ADL:

Top of page

Adabas User Types

As mentioned above, the restart/recovery logic used by Adabas in a given situation mainly depends on how an application program accesses the data base. Three user types are distinguished: access-only users (ACC), exclusive file users (EXU) and ET logic users (UPD). ADL uses all of these: which type will be used in a given situation depends on the following features:

The following tables show how ADL applies the Adabas user types and checkpoint methods, e.g. the last column in the first table means

Under these conditions, ADL runs the program as Adabas "EXU" user (indicated in the third line), it issues no ETs (forth line) but uses "C1" commands (fifth line) for the ADL checkpoint method.

Normal Batch Programs

Two situations may be distinguished:

With "STA"

@alt

With "DLI", or "IMS"

@alt

The advantage of using the "STA" parameter for normal batch programs is that no ET calls have to be issued. However, other application programs also using symbolic checkpoints cannot run concurrently. This is because STA programs use the ADL directory file as exclusive (EXU) users.

SDB, BMP (z/OS) or MPS (z/VSE) Programs

@alt

CICS or IMS/TP Message Region

@alt

Top of page

Automatic ET Calls Issued by ADL

Adabas ET logic allows concurrent processing of one or more files by more than one user. All records which are updated by a program are held in a queue and may not be updated by any other user until the program issues an Adabas ET call. This results in a confirmation of all updates made by the program and the release of the held records. However, the use of ET logic for programs (e.g. batch programs) which use files as exclusive users or which do not update these files is not recommended.

If ET calls are not issued often enough, the Adabas hold queue for update records may overflow, resulting in a fatal error. On the other hand, ET calls should not be issued too frequently, in order to avoid unnecessary buffer flushes.

ADL includes an option to issue ET calls automatically. The actual procedure performed depends on the program type and the operational environment. Automatic ETs will be issued in the following cases:

Top of page

Restart/Recovery Logic under ADL

The figures on the following pages explain how ADL uses restart/recovery logic for different program types and operational environments.

Normal Batch Programs

Two situations may be distinguished:

These two cases are described in the tables below.

With "STA"

@alt

In the case of basic checkpointing, it is recommended that DLI or IMS be used instead of STA as the first parameter for DAZIFP to avoid the ADL directory file being in exclusive mode.

With "DLI", or "IMS"

@alt

SDB, BMP (z/OS) or MPS (z/VSE) Programs

@alt

CICS

@alt

IMS/TP Message Region

@alt

Top of page

ADL Actions for Basic and Symbolic Checkpoints

Normal Batch and SDB/BMP/MPS Programs

With a CHKP call, the following message is written to the DAZOUT1 file:

'DAZCHKP - CHECKPOINT WRITTEN. DATE: dd/mm/yy TIME: hh/mm/ss FOR PROGRAM progname
 WITH CHECKPOINT-IDENTIFIER chkpiden'

where

dd/mm/yy is the actual date,
hh/mm/ss the actual time,
progname the name of the application program,
chkpiden the eight-character checkpoint identifier as passed to the CHKP call.

If the symbolic checkpoint call is used, up to seven data areas are stored on the ADL directory file. The checkpoints on the latter are identified by the name of the program and the eight-character checkpoint identifier.

Finally, ADL issues an ET and/or a C1 call. In the Adabas checkpoint table, the checkpoints associated with the C1 call are identified by the checkpoint name "CHKP". Please refer to the Adabas Utilities documentation for details on how to obtain and read the Adabas checkpoint table.

If a program ends normally, the corresponding checkpoint entries on the ADL directory file will be deleted. If a program ends abnormally, these entries will be deleted after the program has been restarted. An abnormally ended program which is never restarted will thus produce garbage in the directory file. In order to clear the ADL directory file, run a dummy program containing only an XRST call. This dummy program must have the same name as the abnormally terminated program.

Alternatively, you can list and delete the checkpoint entries in the ADL directory with the ADL Online Services as described in the section The ADL Online Services in this documentation.

CICS and IMS/TP

ADL issues an ET call for each CHKP call.

In all cases, the current position in the data base will be deleted after a CHKP call. In the case of a restart, the position is NOT reestablished after an XRST call.

Top of page

How to Restart a Batch Program

To restart a batch program, perform the following five steps:

Step 1

Use the output of the application program on the DAZOUT1 file to find the checkpoint identifier and the date and time of the checkpoint at which you want to restart your program.

Step 2

Find the corresponding protection log number and block number of the desired checkpoint in the Adabas checkpoint table. This table may be obtained using the Adabas ADAREP (report) utility. See the Adabas Utilities documentation for more details.

Step 3

Make a copy of the protection log file using the Adabas ADARES (restart) utility with either the COPY or the PLCOPY function, for single or dual protection logging respectively. The following ADARUN and ADARES statements are provided as an example (dual protection logging was active):

ADARUN input statement:

ADARUN PROGRAM=ADARES,MODE=SINGLE

ADARES input statement:

ADARES PLCOPY DUALPLD=3350

See the Adabas Utilities documentation for more details.

Step 4

Restore the entire data base or one or more of its files to the state in effect when the desired checkpoint was taken, using the Adabas ADARES utility with the BACKOUT function. The following ADARUN/ADARES input statements are provided as an example.

ADARUN input statement:

ADARUN PROGRAM=ADARES,MODE=SINGLE

ADARES input statement:

ADARES BACKOUT FILE=37,PLOGNUM=8,TOCP=CHKP,TOBLK=19

File 37 is restored to the checkpoint which is found on protection log file 8 in block 19 (all checkpoints issued by ADL are named CHKP). Please refer to the Adabas Utilities documentation and the Adabas Operations documentation for more details.

Step 5

Restart your program. The eight-character checkpoint identifier may be supplied either with the CPID keyword for DAZIFP or in the I/O area referenced by the XRST call in the application program. If both methods are used at the same time, the value provided with the CPID keyword will be used.

If the checkpoint is not found on the ADL directory file, or if the XRST call requests more data than have been previously stored with the CHKP call, ADL will issue an error message and abend the application program immediately.

Top of page