× 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.



On 25-Apr-2016 17:20 -0500, Vinay Gavankar wrote:
I want to copy the QPJOBLOG spool file of a given job name (coming
in as a parameter) to a physical file in a CL program.

When there are duplicate jobs with the name, I want to copy for all
of those jobs.

I think it can be done by using WRKJOB with DUPJOBOPT(*MSG) and then
using RCVMSG to get all of the job numbers in a loop and doing the
CPYSPLF.

I am not sure how exactly to do it, or whether there is another way
to do this.

Any help will be greatly appreciated.


The following web search(es) might assist in that regard, for finding examples, but without even resorting to the alluded alternate command; i.e. using only the CPYSPLF, after which the Receive Message loop is performed on the preceding diagnostics:
[https://www.google.com/search?q="rcvmsg"+"CPF0906"+OR+"CPF3343";]

Also likely to help find something similar, with other /job/ commands, but beware those will want to produce their own spool file [or output to display] when there is only one vs duplicates, so use of an API [or anything else others have offered] vs a command might be more appropriate:
[https://www.google.com/search?q="rcvmsg"+"CPF0906"+OR+"CPF1096";]

As others have alluded [at least Rob], the /why/ for the request is probably worth considering; i.e. rather than solve the specific issue, perhaps consider what can be done to avoid having reached the point whereby that action was felt necessary. Note, there is the Control Job Log Output (QMHCTLJL) API that a job can use to effect output of their joblog to a database file instead of a spool file; having used that, a separate job need not reactively request to find and copy the spooled version.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.