Restore all archived data sets for DSN=abc./ to be able to run a complete BACKUP ?

Document ID : KB000012448
Last Modified Date : 14/02/2018
Show Technical Document Details
Question:

How to restore all archived data sets for DSN=abc./ to be able to run a complete BACKUP ?

Answer:

Consider to use FMS RECOVER to restore all Archive versions before the BACKUP. 

Here a JCL sample in SIMULATE mode for testing purpose: 

 

//STEP01 EXEC FMS 

//SYSPARMS DD * 

SYSPARMSS 

//SYSIN DD * 

  SET MODE=SIMULATE 

  SCAN DSNINDEX 

  SELECT DSN=(abc./), 

  CRI=(VERSION,EQ,0,AND,ARCTYPE,EQ,ARCHIVE) 

  RECOVER 

/*

 

Note: This is only safe if you have RESIXRPD set to 00 in your SYSPARMS. 

 

With CRI=(VERSION,EQ,0,AND,ARCTYPE,EQ,ARCHIVE) you check if the latest DSNINDEX entry is from an Archive. 

However, the RECOVER does not check the catalog status. So this method can only be used if you have sysparm RESIXRPD set to 00 in your SYSPARMS. 

RESIXRPD00 deletes the DSNINDEX Archive entry after an archived data set is restored or recovered successfully under its original name. 

In other words, RESIXRPD00 makes sure, the data set exists either on DASD, or there is a DSNINDEX Archive entry for it. 

 

If you have RESIXRPD set for example to 03, then you could have restored and possibly changed a data set while the DSNINDEX Archive entry still exists. 

So the RECOVER could override an already modified data set within these 03 days, data loss would occur!