iSeries - Find jobs that ran from a given JOBQ

Matthew Roessner
Matthew Roessner used Ask the Experts™
on
I am wondering if there is a way to view all the jobs that have ran from a particular JOBQ for the past 24 hours (or the past xx hours)?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
VP Technology / Senior Consultant
Commented:
When a jobs starts/ends, information is captured several places:

- CPF1124/CPF1164 message written to system history log.  Message does not contain job queue name.
- Job accounting journal entry written if Job Accounting is enabled.  Journal entry does not contain job queue name.

Fortunately, there is a system exit point that can provide job queue name when a job is queued, started, or ended - the Job Notification exit point:

https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_73/apis/xjobntfy.htm#HDRJNTYF1 

You associate this exit point with a data queue, and then write a program to process the data queue entries.  This exit point is fired when a job is placed on a job queue, when a job starts, and when a job ends.  Based on your requirements, you can capture, one, two, or all three of these events.

Here is a great article that explains the process and even supplies sample code.

https://www.mcpressonline.com/programming/apis/the-api-corner-monitoring-a-job-queue

- Gary
Matthew RoessnerSenior Systems Programmer

Author

Commented:
Thanks for the information and the article!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial