|
On Nov 7, 2017, at 10:05 AM, Steinmetz, Paul <PSteinmetz@xxxxxxxxxx> wrote:--
The goal/intention is to only release spoolfiles / email error reports when they contain errors.
We use IBM's InfoPrintServer configured to email using PDF map entries.
The spoolfiles are only emailed if in a *RLS status.
The process will be added as the last sequence of pre-selected schedule jobs.
I've created a routine to release / email spoolfiles only if errors exist.
1) CPYSPLF to QTEMP/chkforerr
CPYSPLF FILE(QSYSPRT) TOFILE(QTEMP/chkforerr) +
JOB(&JOBNUM/&JOBUSER/&JOBNAME) +
SPLNBR(*ONLY) CRTDATE(*LAST) CTLCHAR(*PRTCTL)
2) Call RPGLE pgm which scans PF chkforerr for a specific string '* NO OUT OF BALANCE ACCOUNTS *'
3) If string found, (no errors exist) RLSSPLF FILE(QSYSPRT) JOB(&JOBNUM/&JOBUSER/&JOBNAME)
The problem is I don't always know the job number for the job that created the spoolfile, which is needed for both the CPYSPLF and the RLSSPLF.
Any thoughts from the group on identifying the job number or other options?
Thank You
_____
Paul Steinmetz
IBM i Systems Administrator
Pencor Services, Inc.
462 Delaware Ave
Palmerton Pa 18071
610-826-9117 work
610-826-9188 fax
610-349-0913 cell
610-377-6012 home
psteinmetz@xxxxxxxxxx<mailto:psteinmetz@xxxxxxxxxx>
http://www.pencor.com/
--
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,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD
As an Amazon Associate we earn from qualifying purchases.
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.