Spool File Count From A Single Job?
525 pts.
0
Q:
Spool File Count From A Single Job?
Is there a way to determine the total spool file count that was generated from a single job (including spool files that have a 'FIN' status)?     We had a job that went into a loop and generated thousands (maybe hundreds of thousands) of spool files.     It is impossible to manually count them.     The problem is, the AS/400 has a limitation of 16.6 million spool files before it stops creating anymore (this has happened to us once before).     I am trying to identify the poorly written programs and provide an actual number of spool files that get generated from a job (FIN 'Finished Printing' status).

ASKED: Sep 30 2009  5:51 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
24520 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
I think you can do this with RTVSPLFA
It allows you to specify Spooled file number . . . . . . *LAST
and get
Return spooled file number (6)
Phil

===

Sounds like you may want to do this after the fact and posibly not have a job name.
First, use the WRKSPLF command and specify output(*PRINT)
Note: you can get a subset of you use some of the options on the command or you can get everything.
Now, the output from that wil be a splf that you can copy to a database.
If you use the proper selection, you can just get the detail records.
Now, with SQL or QRY, you can sort the file by FIle Number, or do any other kind of interegation you would like to do,

--------------
What a compliment Whatis23 but it was CharlieBrowns idea that you're expanding on .. mine, RTVSPLFA, may have died a glorious death?
Phil
Last Answered: Sep 30 2009  9:04 PM GMT by Philpl1jb   24520 pts.
Latest Contributors: CharlieBrowne   6465 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Whatis23   4040 pts.  |   Sep 30 2009  7:18PM GMT

Phil is correct as per usual.
I would enter this command:
WRKSPLF SELECT(*ALL) JOB(number/user/jobname) OUTPUT(*PRINT)
CRTPF FILE(library/filename) RCDLEN(132)
CPYSPLF FILE(QPRTSPLF) TOFILE(library/filename) JOB(number/user/QPADEVxxxx)
You can then sql or qry

 

TomLiotta   7355 pts.  |   Oct 8 2009  10:26PM GMT

“…spool file count that was generated from a single job…”

That sounds like you know the name of the job that needs to be checked. I’m not sure if WRKSPLF, etc., will be reliable if you’re approaching the limits on total spooled files. The only reliable count should come from the Open List of Spooled Files (QGYOLSPL) API. Even the more common List Spooled Files (QUSLSPL) API is going to choke if the number of spooled files is larger than around 120K files or so.

Note that you wouldn’t actually have to process any data coming back from the API other than the [Total records] value from the List information parameter.

But if you know the job name, then WRKJOB JOB(jobname) OPTION(*SPLF) might be enough. If the list displays successfully, press <F18=Bottom>, then press <F11> until view #3 is shown. The last spool file number should show at the bottom of the list.

If it doesn’t crash the command, that should do it. Otherwise, the open-list API may be the only realistic choice. (I’ve seen excessive spool-file counts cause trouble, but not yet in V5Rx nor 6.1.)

Tom

 
0