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.
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.
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Buck Calabro
Sent: Wednesday, August 12, 2015 4:38 PM
Subject: Re: Prevent spoolfiles generated via wrkqry from being auto emailed if "No records in query report. "
On 8/12/2015 3:38 PM, Jeff Young wrote:
What I do when I need to know if my query produced results first
before taking any other action is to run the query directed to an
output file in qtemp, then retrieve the number of current records in
that file. If the value is ZERO, I have no data and skip the rest of my processing.
We have similar things going on here. We'd write a query because it was faster than writing a program. Then we had to do something special to format it. Then we had to do another special thing to send it. Then another special thing to avoid sending it if it was empty.
It turned into a lot of work in order to save ourselves the work of writing a program. I guess in the end it was OK because the work was spread out over time...
Today, I'd argue for a proper program that does the extract, formatting, and if there's something to be sent, do the emailing.
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l