iSeries - Find jobs that ran from a given JOBQ

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)?
LVL 1
Matthew RoessnerSenior Systems ProgrammerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Gary PattersonVP 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
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Matthew RoessnerSenior Systems ProgrammerAuthor Commented:
Thanks for the information and the article!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IBM System i

From novice to tech pro — start learning today.