Job Log

2,480 pts.
Tags:
CHGJOB
CLP
i5
iSeries
Joblogs
OVRPRTF
I am attempting to have the Job Log for a specific CLP end up in a specific output queue that is different from where we want the rest of the Job Logs to go. I have attempted to use OVRPRTF, CHGJOB and even set up a unique JOBD to no avail. Does someone have an idea as to what will work for a unique CLP ? Thank You, Bill
ASKED: August 7, 2008  5:09 PM
UPDATED: October 16, 2009  3:44 AM

Answer Wiki

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

Hi,

How job logs are created
Release V5R4 brings job logs into the “on demand” world. The job logs are available when needed, but no work is done to produce job logs for which there is no need.

The LOG parameter has three elements: the message (or logging) level, the message severity, and the level of message text. Each of these elements have specific values that when combined determine the amount and type of information sent to the job log by the job.

For example, the *NOLIST value of the Text element causes no job log to be produced if the job ends normally. (The job log does not go into pending.) If the job ends abnormally (if the job end code is 20 or higher), a job log is produced. The messages that appear in the job log contain both the message text and the message help.

You can control what produces the job log. This is done with the LOGOUTPUT parameter. When a job completes, one of three actions occur that affects how the job log is created. The following are values of the LOGOUTPUT parameter:

The job log server produces the job log: (*JOBLOGSVR)
The job itself produces the job log: If the job cannot produce its own job log, the job log will be produced by a job log server. (*JOBEND)
The job log is not produced: The job log remains in pending until it is removed. (*PND)
Note: These values do not affect job logs that are produced when the message queue is full and the job message queue full action specifies *PRTWRAP. Messages in the job message queue are written to a spooled file, from which the job log can be printed, unless the Control Job Log Output (QMHCTLJL) API was used in the job to specify that the messages in the job log are to be written to a database file.
What controls the job log parameters?
When a job starts, it gets its LOGOUTPUT value from the job description. If the job description specifies *SYSVAL (the default for CRTJOBD), the job uses the job log output value that is specified in the Job log output (QLOGOUTPUT) system value. (While the shipped value for the Job log output (QLOGOUTPUT) system value is *JOBEND, the recommended value is *JOBLOGSVR.) After the job has established its LOGOUTPUT job attribute, any changes to the job description or system value do not affect the active job. Changes to the system value or to the job description take effect for jobs entering the system after the change.

You can use the Change Job (CHGJOB) command or API (QWTCHGJB) to change the LOGOUTPUT job attribute after it has already been set in the job. Changes to the job take effect immediately.

Regardless of the method that you choose, the options for handling job logs are the same. You can set the job to not produce a job log (*PND), have the job produce the job log (*JOBEND), or have the job log server produce the job log (*JOBLOGSVR).

For more information on this topic, see the following website…

http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/rzaks/rzaksaboutjoblogpending.htm

Discuss This Question: 6  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
  • wpoulin
    Unfortunately we are at V5R3 at the moment. I don't see that the response above relates or gives me the solution I'm looking for. Thanks, Bill
    2,480 pointsBadges:
    report
  • Gilly400
    Hi, Have you tried this :- OVRPRTF FILE(QPJOBLOG) OUTQ(youroutq) OVRSCOPE(*JOB) Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • wpoulin
    Martin, Yes I have, the joblog still ends up in qezjoblog. Bill
    2,480 pointsBadges:
    report
  • Gilly400
    Hi Bill, I think the problem is that the joblog gets created *after* the job has completed, so the overrides, etc have no effect on it. Maybe what you could try is to put the OVRPRTF in the CLP and as the last statement before it ends do a DSPJOBLOG *PRINT in the CLP itself. This way you should get a copy of your joblog in the right place. If you don't want the *real* joblog to go to QEZJOBLOG, then you can add a CHGJOB LOG(0 99 *NOLIST) after the DSPJOBLOG command. This isn't a very nice way of doing what you want, but I think it should work for you. Regards, Martin.
    23,730 pointsBadges:
    report
  • wpoulin
    Martin, I came up with the same solution last week, but I was hoping that someone here would have a cleaner one. Yes, by doing the dspjoblog at the end of the clp I can control that report. Guess I have to be satosfied with this solution until I get to V5R4. Thanks, Bill
    2,480 pointsBadges:
    report
  • TomLiotta
    First, duplicate QPJOBLOG into a library that you create for this purpose. Example name is MYSYSLIB. Then, change that copy of QPJOBLOG to point to the *OUTQ that you want. Now, in your CL program, issue CHGSYSLIBL LIB( MYSYSLIB ). This would be done as the first executable command in order to be sure that it was in place whenever a joblog might be produced. MYSYSLIB will be at the top of the system portion of the library list, above QSYS. QPJOBLOG will be found in MYSYSLIB. Note that you won't want anything else in that library. Only this job should have authority to the library. Only this job will be affected by the altered setting. 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