Finding Pending Job Logs
After a recent iTech Sips and Tricks, I was speaking to David Larsen from Cabinetry by Karman in Utah, and he had a great tip that he wanted to share with everyone. So, he sent me some information that I reformatted as a technical tip for our newsletter. Thanks, David !!!
If you have ever used the Display Job Table (DSPJOBTBL) command to see the number of jobs on your system, you might have seen more jobs than you can account for. There can be more total jobs than actual jobs in the system when there are PENDING job logs. There is no output in the out queues, making the system appear to have “phantom” jobs in the system. You can have this problem if the system value QLOGOUTPUT is sent to *PND, and not *JOBEND, or the job description has JOBLOG *PND, instead of *JOBEND. Changing the value to *JOBEND will produce a joblog. When the value is *PND, the job log will not be produced. The job log remains pending until removed.
You can determine if there are any pending joblogs by using the command WRKJOBLOG. Notice I used *BEGIN and *END to see all pending joblogs from any date.
You will see a list of pending Joblogs.
If you want to delete all these pending joblogs, you have to call the API. I find it easiest to CALL QCMD, and hit F11 to get a full screen. Then you can cut and paste the API below to delete them all
CALL PGM(QWTRMVJL) PARM(X’0000002C000000005CC1D3D34040404040405CC1D3D34040
404040405CC1D3D340405CC1D3D3404040404040′ ‘RJLS0100′ X’0000000000000000’)
The parameters in the example have the following values:
CALL PGM(QWTRMVJL) PARM(X’
0000002C 44 – Length of job selection criteria – 44
00000000 0 – Days since job completion – 0
5CC1D3D3404040404040 *ALL – Job Name
5CC1D3D3404040404040 *ALL – User name
5CC1D3D34040 *ALL – Job Number
5CC1D3D3404040404040′ *ALL – Job log output
You can use the Display job Table command to see fewer jobs in your system. You don’t want to get the number of jobs in your system too high.