How Checkpoint Process works for a complex batch environment?

Hi Good day!

Can someone help me to understand about the checkpoint in ADABAS.

What is the checkpoint process in adabas?
How the point of recovery performed?
How everyone performing the point of recovery in their environment, which process you are following and what are the options there?

Adabas takes various checkpoints. See here: Adabas Checkpoints.

DBAs have two primary uses for them.

  1. Disaster recovery - We can recover a database by restoring from a backup and applying PLOG data to a specific checkpoint prior to the failure. (Thankfully I have never been required to do this.)

  2. Rollback database updates - DBAs can create a test database by restoring from a backup. Testers tweak the data for specific scenarios, and a checkpoint is taken. If tests fail, the database is rolled back to the checkpoint so that tests can be re-run (following any necessary coding adjustments). Rollbacks can be much quicker and cheaper than a full restore.

Hi Ralph,

Thankyou!

Here is one recap,
We had the Cobol program for checkpoint process where it is opening the checkpoint file in UPD mode and it was in use late 80s,
there was a bug in Adabas version 5 with C1 command and it was gotten rid of at that time. Now when we try running the job using UPD mode with C1 command for checkpoint processing it is abending with response code 17 sub code 2. It is not working anymore!
So just wanted to know how other companies overcame and doing the checkpoint process currently.
There may be many ways to do a point of recovery like
1.Introducing checkpoint step right before the DML step in a complex batch job environment. So, if a job abends when it is doing insertion so and so reason then the checkpoint record will be helpful to back it out from the checkpoint step.
2.If it is small batch so we really can take backup of the application file right before DML step and use the backup to restore the data if required when job abends at the DML step.
We understand the protection on the checkpoint file is being tightened post this bug in ADABAS version 5 and the combination of L2 and C1 commands in UPD mode for the checkpoint processing is not being allowed anymore.
So, we would like to see the options of point of recovery in batch environment that companies/organizations came up after the early 90’s issues with the checkpoint file and how they are doing checkpoint process currently.
Any suggestions?

I would use utility ADADBS OPERCOM FEOFPL to create a checkpoint.

Checkpoints in general allow ADABAS to restore to a particular point in time.

In the old old days this was used by application programs in batch to create a point they could backout or restore to.

With the introduction of the ET command (and restart data) there is little use for this anymore other than legacy.

Today the primary use is for disaster recovery. Each Utility and the nucleus write a Checkpoint.

When a database has crashed and is damaged the process to recover is: RESTORE from backup and REGENERATE using PLOG(s).

The REGENERATE will stop at any checkpoint where it cannot continue (note some utility checkpoints like AOS don’t stop it).

In general these checkpoints are where external data needs to be loaded. Anyways these utilities need to be rerun.

Then the REGENERATE can continue rolling forward processing the PLOG.

This is simplified but I think you get the point.

Eugene (Gene) Miklovich

ADABAS/NATURAL Systems Support and DBA

Cell: 916-202-7047

Normal Hours: 8am-4pm E.T.

Please call or text if assistance needed outside these hours.

I would recommend changing the code to do ET’s with restart data instead.

Also add logic at the beginning to read the restart data to determine where to restart the process.

This is current best practice as it allows 7x24 operation. No need to take file out of service to backout or restore.

Thus no need to lockout other updates.

Eugene (Gene) Miklovich

ADABAS/NATURAL Systems Support and DBA

Cell: 916-202-7047

Normal Hours: 8am-4pm E.T.

Please call or text if assistance needed outside these hours.

Gene,

Priya and I are referring to situations where ETs are working as they should. For example, in a test environment, program logic is incorrect, the code must be changed, and the batch jobs must be re-run. But first the data must be restored, and a rollback can be more expedient than a database restore.

I agree that on the surface it is more expedient to do a rollback, however:

Thankyou Gene and Ralph!

We have thousands of programs which requires ET and restart data logic. Multiple teams need to be involved and they needed to be educated on the changes. This is the difficulty here. But we understand that taking file out of service to backout or restore is not good thing, but our batch environment is complex and really big!
So, can you suggest us the best practices for checkpoint processing for batch environment to perform forward recovery/backout.
We think current checkpoint program used in our checkpoint processing needs improvement because since we cannot use UPD mode on the checkpoint file for the batch jobs after the bug in ADABAS version 5 in early 90’s, there are multiple contention issues we have with EXU mode on the checkpoint file.
We really wanted to know what are the options considered at that time(i.e,early 90’s) for checkpoint processing.

Hope you were aware of the situation happened with C1 command in UPD mode on the checkpoint file and it is related to the bug in ADABAS version 5. The security on the checkpoint file being tightened at that time.

I’m not familiar with the “bug in Adabas version 5” that you are referring to. Are you still on Adabas v5? if not, what version are you on? do you have a support ticket open for the resp 17 sc 2 issue?
You mention using EXU and UPD modes? on the checkpoint file? why are you using EXU on the checkpoint file? You can’t roll back changes to the checkpoint file.
Are you using an OPRB=(UPD=n), where n=checkpoint file nbr?
If using a C1 command, I would expect that you are not accessing/updating the checkpoint file other than by issuing C1/ET/BT commands. The checkpoint file should not be in your open file list as it is a database system file.

Hi Douglas!

Thankyou for the response.

Currently we are on ADABAS version 8.5.3. Yes, we have opened ticket in software AG global support for response code 17 sub 2.
This is their response,
"What I have been able to find out subsequently, although not in detail as this happened 40 years ago, when Adabas was at version 5, is that some loophole was discovered in version 5 involving the checkpoint file and C1s and that security on the checkpoint file was tightened in Adabas version 6. I gather that it had to do with using a UPD versus an EXU, and that after the loophole was closed, an attempt to do things the old way resulted in a response 17 subcode 2.

So, this is good information, because while it is security related, I know now that it is not SAF or RACF related, but rather a result of tighter protection on the checkpoint file, which is an internal Adabas system file.

So, I think the answer is that you cannot change the Cobol programs back to the old way as this combination of commands is no longer allowed.
You may have some luck posting this and asking your questions on the tech community forum on Empower to find out what customers elsewhere in the world have done and how they have moved on. I do not think this approach is widely used any longer, though".

We are using EXU mode on the checkpoint file, it is in place since early 90’s once we had an issue with UPD mode/C1 &L2 command. We cannot issue C1 command now with UPD mode on the checkpoint file but above explanation from Software AG global confirms the same.
We are not using OPRB at this time. Actually, we are writing checkpoint entry on the checkpoint file using EXU mode now.

So how are your programs requesting EXU vs UPD mode? is the checkpoint file being included in this mode request? Typically this is done on the OP call, supplying a Record Buffer with the list of modes and files to use (aka “OPRB”). What call (OP, L2, A4, C1?) gets the r17sc2 error?
As I said earlier, you should not be including the checkpoint file in setting the usage mode at all, so it doesn’t make sense to say “we are writing checkpoint entry on the checkpoint file using EXU mode” - you don’t specify a file number when using the C1 command as Adabas knows which file is the checkpoint file.

Hi Douglas,

1.The checkpoint program we use issues an Adabas open EXU to produce a
checkpoint.
EXEC ADABAS
CONNECT
EXU = CHECKPOINT-FILE
END-EXEC.

2.Read physical L2 gets an RC17 subcode 2 error.
EXEC ADABAS
READ PHYSICAL
DECLARE CP01 CURSOR FOR
SELECT
DATE-TIME,
CHECKPOINT-NAME,
TAPE-NUMBER,
BLOCK-NUMBER,
JOB-NAME
FROM CHECKPOINT-FILE.