How To Re-Route JobLogs to diff OutQs for a group of jobs

pts.
Tags:
Development
I'm trying to re-route JobLogs to diff OutQs. I've copied QPJobLog *PrtF to QPJobLog2 *PrtF. I've changed the OutQ parm on QPJobLog2 to *Job. In the CL pgm, I have two OvrPrtF cmds: OVRPRTF FILE(QPJOBLOG) TOFILE(RBSYS/QPJOBLOG2), OVRPRTF FILE(QPJOBLOG2) TOFILE(RBSYS/QPJOBLOG2) OUTQ(RBSYS/PRPOUTQ). I've also tried using the ChgJob Cmd at the end of my CL pgm, ChgJob OutQ(RbSys/PrpOutQ). However, my JobLogs are still routed to QEzJobLog. I don't want to change all our CL pgms, and explicitly tell each and every pgm, where to spool JobLogs (by changing QPJobLog OutQ parm to *Job). Can you tell me what's wrong?

Answer Wiki

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

Here’s what i do. When i want to modify a system behaviour, i create copies of the system objects in a library that sit’s above QSYS in the system portion of the library list. Then when the new copies of the objects are used instead of the IBM originals (which shouldn’t be changed directly).

– Create a new library [CRTLIB] (Don’t start the name with a ‘Q’ and only use this lib to override IBM functions. It’ll make it easier to manage)

– Create a duplicate object from QPJOBLOG in the new library [CRTDUPOBJ]

– Change whatever you need to on the duplicate object

– Change your systems portion of the library list so that the new library is on top, above QSYS. [CHGSYSVAL QSYSLIBL (then prompt)]

The next job you submit should go to the new outq. You shouldn’t even need overrides. It’s just a guess but i think the reason that your logs are still going to QEZJOBLOG is probably because your override is not in effect when the joblog is written.

The only thing you need to be aware of with this approach is that whenever you upgrade the OS or any other time a system object is changed by IBM, you need to review what you’ve dup’d into your lib.

Hope that helps!

Discuss This Question:  

 
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

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