Chances are in the past you've had one or more jobs on your iSeries server, which were suddenly consuming a huge amount of temporary disk space -- in fact, disk storage on your system.
In most cases the reason was that the job got into a loop.
The amount of temporary storage increases dramatically and can theoretically bring your system down by filling up your disk space up to 100%.
To reduce this exposure, I wrote the RTVJBTSPC CL program that can be scheduled regularly. It scans user active jobs -- interactive and batch -- independently in the subsystems in which they are running.
If a predefined limit (in Kilobytes) is reached (stored in *DTAARA
*LIBL/ TMPSTGLMTJ) an appropriate action can be started.
For example, sending information (e-mail, SMS) or/and set the job to Hold or ending it immediately.
Be aware to create *DTAARA *LIBL/TMPSTGLMTJ to store your defined limit in kilobytes.
DTAARA creation for 1 GB limit with:
CRTDTAARA DTAARA(AWDPFILE/TMPSTGLMT1) TYPE(*DEC) LEN(15 0)
VALUE(1000000)
TEXT('Limit temporary storage for single job in KB')
View the program here.
Code