Writing Information to the JobLog

690 pts.
Tags:
Joblogs
RPG IV
RPGLE
I've seen a number of snippets here and there on the internet regarding the ability to write specific information to the job log in order to figure out exact problems, based on the conditions placed within. I've seen reference being made to some API, but have been unable to actually find useful information for its utilization. I'd like to make a standalone program that can be called from anywhere that allows me to write information in the job log. Of course I can make my own MSGID's and so on, and use that for my error text, but I have no idea as to how I can write to the job log. Please help me find a way to do this, because really, job logs don't help me with anything other than a vague statement and field values.

Answer Wiki

Thanks. We'll let you know when a new response is added.

The job log contains all the messages form every call stack entry message queue associated with that job. So to send a message to the job log you need to send a message to a call stack entry. This can be done with commands such as <a href=”http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/cl/sndpgmmsg.htm”>Send Program Message (SNDPGMMSG)</a> with the TOPGMQ parameter and/or APIs such as <a href=”http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/apis/QMHSNDPM.htm”>Send Program Message (QMHSNDPM)</a> and the Call stack entry/Call stack counter parameters.

Hope this helps,
Bruce Vining

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    A job's "joblog" has (at least) two different meanings depending on whether the job has completed or not. The spooled "joblog" is simply the result of converting messages from the job's call stack entry message queues into text. While the job is active, one of the simplest ways to get messages into the "joblog" is to send the messages to the job's external message queue -- TOPGMQ(*EXT). Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following