A Disk ARCHIVE job that archives several datasets is getting a condition code 08 because one of the FIND statements gets message 2793 which says 'NO CATALOG ENTRIES WERE FOUND' even though the dataset does exist!
ADSST208 2793 NO CATALOG ENTRIES WERE FOUND TO MATCH DSN= ABC.DEF.XYZ/
ADSST208 2793 FIND COMMAND NOT PROCESSED
The data set does get deleted and archived and can be restored.
The problem occurs because of overlapping FIND statements. The order of the two FIND statements in the ARCHIVE
FIND DSN=ABC.DEF/
FIND DSN=ABC.DEF.XYZ/
is causing the problem with the CC=08, because the first FIND command already includes the data set(s) of the 2nd FIND.
So at the time of the ARCHIVE command being processed, the data set was gone and “no catalog entries were found” is accurate.
Remove the FIND that is already included in the other FIND.
FIND DSN=ABC.DEF/
FIND DSN=ABC.DEF.XYZ/
Delete the second FIND as it is already included in the first FIND command.
Alternatively, consider to set the sysparm CCDRESET to Y.
Specifying this sysparm with a value of Y suppresses the job condition code to 0 for message 2793 generally.
The data set status at the start of the job is not the question. Disk would have gotten the same result if something else had deleted the data set before Disk got to that command.
At the time of the ARCHIVE command being processed, the data set was gone and “no catalog entries were found” is accurate. Disk does not track which commands and patterns overlap, as customers can have many of them.
The reason for the CC=8 is because the action was ARCHIVE.
Other actions which do not delete the data set, like BACKUP, would run with a zero CC.
Also, FIND commands are not skipped by Disk because they are redundant.