Job log pending has long been a possible state for a job log. When a job has a pending job log, the job has ended but the job log has not yet been written to an spooled file. In older releases of IBM i, this could occur when you powered down the system – the job logs would be saved in a pending state and the job logs would be written to spool files when the system was powered back up.
Every job on the system has a set of job structures, as I described in the IBM i Job Structures post written earlier. Job log messages are stored in an internal structure that is called the “job message queue.” The “traditional” behavior is for job log messages to be written a spooled file when the job ends.
However, think about certain scenarios: You end a subsystem that ends many jobs. You have a network failure that causes all Telnet sessions to be terminated. You have a runaway job in a loop that creates an unexpected number of jobs that do a small amount of work and then end. Or other situations where a large number of jobs are ended at about the same time.
In each of these scenarios, you can potentially have hundreds or even thousands of jobs that will all end at about the same time. If all of these jobs that are ending are also writing their job logs to spooled files, you can imagine the additional workload that would put on the system – writing job logs is a fairly expensive operation. Do you need to have all those job logs written? Do you have a need to save those job logs at all?
In the 5.4 release, IBM made job log pending a much more valuable and available option to use for job logs.
Rather than writing job logs to spooled files, job log pending allows you to keep the job logs in the internal form that is used when a job is active. No additional system resources are required to keep a job log in pending form (other than the job structure used to store information about the ended job).
Job log pending is controlled by the Job log output system value (QLOGOUTPUT) or the Job log output attribute on job descriptions.
There is much more to be written about job log pending, which I will do in subsequent blogs.
This blog post was originally published on IBMSystemsMag.com and is reproduced here by permission of IBM Systems Media.