Duplicate Backup of dataset although MODBIT is checked
search cancel

Duplicate Backup of dataset although MODBIT is checked

book

Article ID: 4842

calendar_today

Updated On:

Products

Disk Backup and Restore - MVS DISK BACKUP AND RESTORE- ADD-ON OPTIO DISK BACKUP AND RESTORE

Issue/Introduction

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 as shown below:

FIND DSN=pattern
SELECT CRI=(MODBIT,EQ,ON)
BACKUP

Environment

Release: Disk™ Backup and Restore

Cause

This is a 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 Tbehavior for concurrently running backup steps with overlapping selection criteria. 

First 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, cannot select the data set again until the 1st job completes the Backup of that data set. 

Resolution

These jobs do not run in parallel, for example in the job scheduling system should not be scheduled in parallel.

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.