This installment of APIs by Example shows how to use API QGYOLJBL to retrieve job log messages. This API lists messages from the specified job’s job log in sending date and time order. Replies to any inquiry messages are listed immediately after the inquiry message with which they are associated.
In addition to API QGYOLJBL, service program CBX007 uses API QGYCLST to close the open list of job log messages. Like all other open list APIs, these APIs are located in library QGY. You must, therefore, ensure that library QGY is in your library list at execution time.
Service program CBX007 encapsulates the function of API QGYOLJBL into procedure GetLogMsg. You can bind your application programs to service program CBX007 and invoke procedure GetLogMsg to retrieve job log messages.
You should note a couple of security requirements for listing job log messages. *JobCtl special authority is required to list the job log messages of another user. Additionally, to list the job log of a user with a user class of *SecOfr, *AllObj special authority is required.