Search the Job Log of an Active Job
There are two alternatives to view the job log that also have the ability to search.
By Dawn May05/31/2018
Jobs with pending job logs have a status of “Completed - Job log pending”.
- There is a search box to search the job log.
The search results are immediate; just start typing and the table is updated dynamically with the search results. Do not press enter.
- You can specify filter criteria.
The arrows to the right of the search box bring up a filter dialog that allows you to specify criteria for the search. You can limit the search by column, including, excluding, starting with, ending with, etc.
- The most recent messages are at the top.
When I’m looking at a job log, I often want to see what happened recently. Sure, there are times when I want to see what happened at the start of the job (there are often interesting messages logged at the beginning of the job log), but if I’m investigating a problem, the most recent messages are generally more interesting.
- You can add more information to the job log table with the Columns… dialog and easily search on additional fields such To Program or From Program. On the green screen, you can only see these additional fields by pressing F1 to see the message details.
For the sake of completeness, I want to note the following:
You can access job log information with the message handling APIs. While these APIs are available, it’s more work to use the APIs than Navigator or the JOBLOG_INFO service.
- List Job Log Messages (QMHLJOBL)
- Open List of Job Log Messages (QGYOLJBL)
Don’t forget about watches. While watches are not intended to search a job log for a text string, they can be very useful for being notified when specific messages are sent to a job log.
- IBM i Access Client Solutions
IBM i Access Client Solutions does not have ability to access the job logs of active jobs or pending job logs; you can only view printed output, which means spooled files on output queues.
Dawn May is an IBM i consultant. She owns Dawn May Consulting, LLC in the Greater Boston area. Dawn is a former IBM senior technical staff member.