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



Are you still working on trying to find the targeted spooled files? Or are
you asking for a critique of your architecture.

If you are still working on trying to find the targeted spooled files have
you found the QGYOLSPL API?

On Mon, Nov 20, 2017 at 12:23 PM, Steinmetz, Paul <PSteinmetz@xxxxxxxxxx>
wrote:

Final solution.

Purpose - find and release a spoolfile created in the same and/or
different job when the spoolfile attributes could not be changed and/or
override, part of 3rd party package.
Two assumptions.
1) Spoolfile create date/time being checked is greater than the job start
time where the check is being performed.
2) Only one occurrence of the job name exists containing the spoolfile
with date/time greater than the processing job.

To be placed either in a CL and/or Job Scheduler.
In my example, placed at the end of a Robot Schedule job.

4 parameters , all 10(char)

1) Name of Spoolfile to be released
2) Job Name that created the spoolfile to be released
3) Userdata of Spoolfile to be released
4) Search string to determine if spoolfile should be released.

Seq Command
1 RBTRPYLIB/RPYEXECUTE NAME(NIGHTLYNRU)
2 CALL PGM(RLSCHKSPL) PARM('QSYSPRT ' 'S001DBRVRY' 'CBNRC2 ' '*
NO RECOR')
3 CALL PGM(RLSCHKSPL) PARM('QSYSPRT ' 'S001DBRVRY' 'CBNRC3 ' '*
NO RECOR')
4 CALL PGM(RLSCHKSPL) PARM('QSYSPRT ' 'S001NITELY' 'CBNRC3 '
'* NO RECOR')

5 CLP, 1 RPGLE, 2 work files in QTEMP, JOBP and WRKSPLFP

RLSCHKSPL CLP Check Release Spoolfile Main CL
RLSCHKSPLR RPGLE Chk Rls Splf for no records - %scan(search)
RLSCHKSPL1 CLP Chk Rls Splf Part 1 Bld list of jobs CVTJOB
RLSCHKSPL2 CLP Chk Rls Splf Part 2 Prc matched job RTVJOBA2
RLSCHKSPL3 CLP Chk Rls Splf Part 3 Bld list of splf CVTJOBSPLF
RLSCHKSPL4 CLP Chk Rls Splf Part 4 Prc list of splf CPYSPLF ,
RLSSPLF

I've tested multiple scenarios, logic also working if spoolfile was
expected but not created because no records were written to spoolfile.

Any thoughts or suggestions?

Paul

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Steinmetz, Paul
Sent: Tuesday, November 07, 2017 10:06 AM
To: 'Midrange Systems Technical Discussion'
Subject: Release/email spoolfiles only if contains errors - problem in
identifying job number for specific spoolfile

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