Reorganize spool file numbers in a job
Posted: Fri Oct 17, 2025 9:14 am
I have an interesting little problem.
A job is running 24x7 and is generating spool files -- a lot of spool files.
The spool files are deleted after some time but the entry is still reserved.
That means that the spool file number increases over time and in about 3 months it will reach 9999 entries ( system limit )
and cause the job to crash.
Of course I could stop the job once a month and restart it, but I have thought about if it is possible to
"reorganize" the spooled files in the job moving the spool files still existing to the start ( with spool
file number starting with 1) and removing the deleted spool file entries from the system releasing the
spool file number.
Do you have any suggestions or good ideas.
Kind regards
Peder
A job is running 24x7 and is generating spool files -- a lot of spool files.
The spool files are deleted after some time but the entry is still reserved.
That means that the spool file number increases over time and in about 3 months it will reach 9999 entries ( system limit )
and cause the job to crash.
Of course I could stop the job once a month and restart it, but I have thought about if it is possible to
"reorganize" the spooled files in the job moving the spool files still existing to the start ( with spool
file number starting with 1) and removing the deleted spool file entries from the system releasing the
spool file number.
Do you have any suggestions or good ideas.
Kind regards
Peder