Currently, the typical test for an SNC2 condition in the SPACE Environment is:
IF (&IFCAT = 'Y') AND (&DEVCLAS = 'XXXX') THEN DO
Then the typical process statement would be:
SET &SNC2 = 'D' to delete if you are testing for DEVCLAS = 'DISK' or...
SET &SNC2 = 'U' to uncatalog if you are testing for DEVCLAS = 'TAPE' .
Using &DEVCLAS does have a big exposure:
The &DEVCLAS variable returns TAPE or DISK for the NEW (to-be-allocated) data set
and not the OLD (pre-existing) data set.
So, if the NEW allocation is NOT to the same &DEVCLAS as the pre-existing data set,
the SNC2 action will fail.