On 8/12/2015 4:53 PM, Steinmetz, Paul wrote:
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.
You'll need to carefully define what 'empty' means. WRKQRY spooled
files have headings and the 'No records' line, so there is something
there... I mention this because I had a similar idea and was going to
look at the spooled file size (via API) but that got sketchy real fast
when I wanted to make it able to detect 'empty' spooled files generically.