× 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 12-Aug-2015 14:53 -0600, Steinmetz, Paul wrote:
On 12-Aug-2015 13:00 -0600, Steinmetz, Paul wrote:
From AJS, we email many spoolfiles, some generated by wrkqry.
We use InfoPrintServer (PDFMAPE) to auto email the spoolfile by
setting the spoolfile HOLD attribute to *NO.

If the query results in "No records in query report", we do not
want to auto email the spoolfile.

Any of the below manual changes would stop this.
Is there an easy way to accomplish this automatically?

1) Set HOLD to *yes
2) Move spoolfile to different output.
3) Delete the spoolfile

All good input from everyone.
The key when using InfoPrintServer is to interrupt the process
before the spoolfile hits the outq. Not easily done.
So here's some new logic that might work for all AJS jobs.
This would not work for spoolfiles created directly by an
application.

That means to imply interactive utilities and\or non-batch [non-AJS] requests?

By default, have the spoolfiles set to HOLD *YES, thus will not be
emailed.
Create one new generic utility that would look for an "empty
spoolfile" If "not empty" change from HOLD yes to HOLD no, or
release the spoolfile.


Presumably the AJS jobs are performing a Run Query (RUNQRY) CL command? The command-exit feature that allows a followup could perform the "not empty" check and Release Spooled File (RLSSPLF) [optionally even any Change Spooled File Attributes (CHGSPLFA) work] else effect the Delete Spooled File (DLTSPLF), whereas the command-exit pre-processing could effect an Override With Printer File (OVRPRTF) to the QPQUPRFIL to effect the HOLD(*YES).

And similarly, a "generic utility" could encapsulate whatever is the request that spools the output in just one Spooled File (SPLF) [or even many, though probably easiest of a known quantity and names] could easily enough be submitted instead of using the current command. For example a command Conditionally Spool To PDF (CONDSPLPDF) could use the OVRPRTF *PRTF HOLD(*YES) and then perform whatever the AJS request would normally have coded in the CMD() parameter, if "not empty" then CHGPRTF PrtfName HOLD(*NO) else DLTPRTF PrtfName, Delete Override (DLTOVR) [if required\appropriate]; possible invocation variants might look like:

CONDSPLPDF CMD(CALL ITMWRKPEND)
ISEMPTYTXT('No pending work items.')
/* SPLFNAME(*LASTSPLF) */

CONDSPLPDF CMD(RUNQRY theQuery () *PRINTER)
ISEMPTYTXT(*MSGID)
MSGID(QRY1906 QQRYMSG)
/* SPLFNAME(QPQUPRFIL) */

CONDSPLPDF CMD(CALL TWO_SPOOLS)
ISEMPTYTXT(*SPLFNAME) /* MSGID(*NONE) */
SPLFNAME((PRTF_ONE 'Nothing to report.')
(PRTF_TWO '-- N O D A T A --'))

A "generic utility" of the above type requires changing the requests being made, but does not add the complexity of polling\searching for spools trying to decide what to do like the one proposed in the quoted message; e.g. held spooled files that are neither deleted nor released would meet the simplest criteria of selection, and be processed repeatedly. Also eliminates yet-another-process to keep track of.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.