How to restore all archived data sets for DSN=abc./ to be able to run a complete BACKUP ?
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 *
//SYSIN DD *
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!