Tapes got scratched although the GDGs files are still cataloged.
This tape is created by a long running (many days) GTF Trace. When the GTF Trace was stopped, then it was scratched.
The report of tmsaudit shows that the job started on 23 Jan 2025 and ended 27 Jan 2025 and the TMSCTLG resets the expiration date in the TMC on the 25 Jan 2025 - because the file didn't be yet cataloged on the OS CATALOG.
The catalog bit in Flag4 never got turned on because the GTF trace job was not finished running yet. This bit is turn on at termination.
So TMSCTLG ran on the 25th and expired the volume, because it was catalog control and the flag 4 bit was not turned on.
To scratch volume only after the trace was stopped, there are 2 solutions:
- increase the HOLDDAYS on TMSCTLG .
The HOLDDAYS default is 2. Hence, why it expired two days after it was created.
HOLDDAYS=nn
Allowable values are 2-99. Used to alter the standard two-day hold that must elapse after a tape has been created before TMSCTLG is allowed to expire it. To protect long-running tape jobs, the HOLDDAYS retention is applied to all tape data sets under catalog control that were never cataloged.
OR
- code the EXPDT in the JCL to be CATLG/DDD for long running job.