The customer is trying to use IBM's parameter in ALLOC00 in parmlib to control this and CA Allocate keeps getting in there.
They just want to bypass any type of handling of the "Not Catlg 2" condition by CA Allocate.
How to bypass any handling of "Not Catlg 2" by CA Allocate?
Check for &IFCAT = 'Y' and set EXIT CODE(8) to fail before any data set that would get a ‘not catlgd-2’ error is allocated.
Sample ASR code:
IF &VAMENVIR = 'ALLOC'
IF &IFCAT = 'Y'
AND &IFALREADYCATVOL ¬= 'ARCIVE'
WRITE 'STEP &STEPNAME WILL BE FAILED'
WRITE ' TO PREVENT A NOT CATLG 2 CONDITION'
WRITE ' FOR &DSN'
With this, the batch job will fail before any data set that would get a ‘not catlgd-2’ error is allocated with messages:
IEF453I jobname- JOB FAILED - JCL ERROR
IEF272I jobname stepname - STEP WAS NOT EXECUTED.
The data sets that are Archived under CA Disk, need to be excluded via &IFALREADYCATVOL ¬= 'ARCIVE', otherwise all the restores will fail with CC=8 because these actually are cataloged with volser ARCIVE.