Question

  Asked: Apr 25 2008   2:11 PM GMT
  Asked by: ShatteredRaven77


Writing Information to the JobLog


RPGLE, RPG IV, joblog

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.

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



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 Send Program Message (SNDPGMMSG) with the TOPGMQ parameter and/or APIs such as Send Program Message (QMHSNDPM) and the Call stack entry/Call stack counter parameters.

Hope this helps,
Bruce Vining
  • AddThis Social Bookmark Button

Browse more Questions and Answers on AS/400.

Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register