A REORG job gets the following errror:
01.07.54 JOB55027 IEFTMS50 2XX- 08 PR0BREFT,DSNUPROC,SYS00001,0B11,N53429,00105,P00000.D09819.F.L
01.07.54 JOB55027 IEFTMS50 ***** CA 1 ABEND,EX,04
Regarding the 2XX- 08 abend IS NOT SCRTCH (52) message: file 104 started to be created on a particular day (e.g. day X) with a 1-day retention.
The entire 32-volume set had a 1-day retention AND file-1 had gone through CLOSE processing successfully.
Therefore, on day X+1, the volume-set was scratched.
It was scratched WHILE the volume was currently open.
So even though the CLOSE was successful, the WORK FILE message is issued, because the volume was in SCRATCH status (and all DSNBs were deleted) and the expiration date was the current date.
Then, an attempt was made to stack file 105 behind it with an expiration date of day X+2 onto a work-tape (tape in scratch status), and that results in the NS52.
The JCL needs to be improved.
If there is a long-running job that will run past midnight, some type of expiration date should be applied.
In this case, a retention rule for the 1st file (DB2PR0BB.DBMRD.TSEFTAKT.P00000.D09819.F.L) of at least 2 or 3 days should be added and then this problem would not occur.
A retpd=2 on the JCL solved the problem.