Writing system errors to QPJOBLOG system file

330 pts.
Tags:
AS/400
RPG
Ped wrote in with this question recently: "From an ILE-C program, how do I code to write 'system errors' to the QPJOBLOG system file?" Can you help him out? -- Michelle Davidson, editor, Search400.com
ASKED: November 14, 2005  9:25 PM
UPDATED: November 20, 2009  6:09 AM

Answer Wiki

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

first, I assume you ask about QPJOBLOG job spool, I don’t know qpjoblog as system file.

If true, you have to send a message to the caller with the api QMHSNDPM. it is documented on ibm infocenter. I have samples, but in RPG.

If interested, look at http://jplamontre.free.fr/AS400/JP4INC-RPGLE.TXT and search DIE, it’s a procedure that send to caller a message for aborted current program

Discuss This Question: 2  Replies

 
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
  • astradyne
    You can write to the joblog using the system API "Qp0zLprintf" (documented within the Inforcenter). I have a sub-procedure that I use (WrtJoblog) which encapsulates a call to this API and can be called from any ILE program. I also have a command front end for a CL program that calls the sub-procedure so I can write messages to the job log at will. If you want the source for the procedure, prototypes, commands, etc, let me know and I'll send it off list. Jonathan
    370 pointsBadges:
    report
  • TomLiotta
    It's not clear what the situation is. If it's a "system error", how are you detecting it? If it's an error that occurs in your program, all you should need to do is not handle it -- it will be handled by a default handler and propagate up to the job's external message queue, which is what the "job log" is. If it's an error that is returned in an error structure from an API, then you'll need to send it as a message if you want it logged. The short story is simply that you'll send a program message to the *EXT program message queue. See the Send Program Message (QMHSNDPM) API for details. And note that you'll probably want to send it as a *DIAG message. 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