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



You be better off using the list spooled files API (QUSLSPL or QGYOLSPL)
and then using the identifiers there for CPYSPLF where you can read through
the spooled file and determine if you want to release it or not. That API
will have all the information you'll ever want.

Another option is our SPLTOOL software (www.bvstools.com/spltool) has a
command called List Spooled File Attributs (SPLATT) that will list spooled
files and most of their attributes to a PF. This command requires no
licensing at all. It may be easier that one of the API. It allows you to
list spooled files using selection criteria such as user, output queue, job
name, number, etc.

List Spooled File Attributes (SPLATT)

Type choices, press Enter.

Output queue . . . . . . . . . . Name, *ALL
Library . . . . . . . . . . . *LIBL Name, *LIBL
Spooled File . . . . . . . . . . *ALL, generic*, Name
User name . . . . . . . . . . . *CURRENT, *ALL, Name
Job Name . . . . . . . . . . . . *ALL, generic*, Name
Job Number . . . . . . . . . . . *ALL, 000000-999999
Spooled File Number . . . . . . *ALL, 1-999999
User data . . . . . . . . . . . *ALL, User data
Form type . . . . . . . . . . . *ALL, Form type
From Date (MMDDYYYY) . . . . . . *ALL Number, *ALL
To Date (MMDDYYYY) . . . . . . . *ALL Number, *ALL
To file . . . . . . . . . . . . To file
Library . . . . . . . . . . . *CURLIB Name, *CURLIB
To member . . . . . . . . . . . Name, *FIRST
Replace or Add records . . . . . *ADD *ADD, *REPLACE
Create file . . . . . . . . . . *NO *NO, *YES

Once you have a list of spooled files you'll have all the id info for the
spooled file.

That is one downfall of infoprint (*RDY status processing) vs calling a
straight command to email a spooled file, but it works for a lot of people.

Bradley V. Stone
www.bvstools.com
MAILTOOL Benefit #4 <https://www.bvstools.com/mailtool.html>: Easily add
attachments of any type from the IFS to outgoing emails.

On Tue, Nov 7, 2017 at 9: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 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.