× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Given ENDJOB JOB(named) SPLFILE(*YES) was performed to cleanup the spooled files of an ended job, then issue the following request repeatedly until CPF3342 "Job /named/ not found" is issued:
DLTSPLF QPJOBLOG JOB(named) SPLNBR(*LAST)

Of course that is probably easiest accomplished in a CL program, to effect the loop until the condition is met, in cases such as many spooled QPJOBLOG due to wrapping.

And as I noted in my prior reply [¿perhaps my replies do not make it to the list?], the definition of "job log" in the help text is a spool file named QPJOBLOG, so the requirement of the above repeated requests could be avoided by SPLFNAME(otherthanQPJOBLOG) in the wrapped joblogs; e.g. OVRPRTF QPJOBLOG SPLFNAME(JOBLOG) OVRSCOPE(*JOB) in effect for the job... but that override does not remain in effect for the end-of-job spooling for the LOG() setting specified for the job.

Contrary to another reply by Rob [in a reply with the digest subject] that the LOGLMT() parameter will assist for an already spooled joblog, the following documentation confirms the requirement I alluded above:

http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/cl/endjob.htm
_i End Job (ENDJOB) i_
"...
The End Job (ENDJOB) command ends the specified job and any associated inline data files. The job can be on a job queue, it can be active, or it can have already completed running.
...

_Delete spooled files (SPLFILE)_

Specifies whether spooled output files created by this job are kept for normal processing or deleted. Regardless of whether the spooled files are deleted, the job logs are kept.

*NO
The spooled output files created by the job being ended are kept for normal processing by a writer. When the job ends, the spooled file action (SPLFACN) job attribute determines whether spooled files are detached from the job or kept with the job.
*YES
The spooled output files created by the job being ended and which are on output queues in the library name space of the thread issuing this command are deleted. The job log is not deleted. If the job has already ended and the spooled file action for the job is to detach the spooled files, the End Job (ENDJOB) command will not find the job and the spooled files will not be deleted.

_Maximum log entries (LOGLMT)_

Specifies the maximum number of entries in the message queue of the job being ended that are written to the job log. This parameter can be used to limit the number of messages written to the job log printer file, QPJOBLOG, for a job that ends.

The value specified on this parameter can change the logging limit of the job even if the job is already ending or the job has already ended. The following are examples of how the logging limit can be changed:

1. If the value specified is greater than the number of messages written at the time the command is issued, messages continue to be written until the new limit is reached.
2. If the value specified is less than the number of messages already written to the spooled file, a message indicating that the limit has been reached is immediately put in the spooled file as the last entry. The remaining messages on the queue are ignored.
3. If 0 (zero) is specified before any messages are written to the spooled file, no job log is produced for the job that is ending. If the job has already ended and the job log has not yet been produced, the job log is removed regardless of the value of the job log output (LOGOUTPUT) job attribute. For more information on removing pending job logs, refer to the Remove Pending Job Log (QWTRMVJL) API.

*SAME
The message logging limit does not change. If the logging limit does not change for this job on a previous command, *NOMAX is the value used by the system.
*NOMAX
There is no limit to the number of messages logged; all messages on the job message queue are written to the job log.
integer-number
Specify the maximum number of messages that can be written to the job log.
..."

Regards, Chuck

On 09 Apr 2013 04:14, Jonathan Mason wrote:
Great tip, I'd never considered doing that before. One question
though, as ENDJOB won't remove joblogs. Is there anything similar that
will? We quite often get jobs wrapping the joblog and dumping out to
spooled files despite trying to prevent it using the LOG() parameter,
so something like this would be ideal.

On Tue, 9 Apr 2013 06:57:05 -0400 rob wrote:
Exactly. Try it, it WILL work.

lketzes on 04/08/2013 04:36 PM wrote:
The job is simply on the system. It is no longer active.

rob on 04/08/2013 02:52 PM wrote:

ENDJOB JOB(...) SPLFILE(*YES)

lketzes on 04/08/2013 02:38 PM wrote:

Quick question - Does anyone know of a way to quickly delete
a job and all spool files associated with it?


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.