Duplicate Backup of dataset although MODBIT checked

Document ID : KB000004842
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

Due to some delay two backup jobs that are usually running at different times ran at the same time. 

Both jobs overlap in their FIND statements, but both check the MODBIT to avoid duplicate backups, like

FIND DSN=pattern

SELECT CRI=(MODBIT,EQ,ON) 

BACKUP  

However, a data set was backed up twice.

Cause:

This is an unfortunate timing issue. Since the backups were at approximately the same time, the selection was done before either had completed and updated the MODBIT. The MODBIT is only reset once the data set is backed and disposed of – not at the start. 

This is a general behavior for concurrently running backup steps with overlapping selection criteria. 

At first CA Disk builds an internal table with the data sets by using the selection criteria, e.g. 

FIND DSN=pattern 

SELECT CRI=(MODBIT,EQ,ON) 

Then the data sets are processed one after the other, that means enqueued, opened, read and copied, closed, and finally dequeued. 

The MODBIT is reset after the close. 

That means, a 2nd Backup that is running at the same time and checking the MODBIT, can select the data set again until the 1st job completes the Backup of that data set. 

Resolution:

The customer needs to take care that these jobs do not run in parallel, for example by their job scheduling system.

A simple work-around could be to add a DD statement for data set with DISP=OLD to the backup steps of both jobs. 

So both steps could no longer run at the same time.