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


  • Subject: RE: Spool file number
  • From: Buck Calabro <mcalabro@xxxxxxxxxxxx>
  • Date: Tue, 8 Sep 1998 10:18:47 -0400
  • Organization: commsoft

On Tuesday, September 08, 1998 9:19 AM, Saunders, Martin P 
[SMTP:Martin.Saunders@capgemini.co.uk] wrote:
> Is there any way to retrieve the file number of a particular spool file
> from the spool file attributes in a CL program?  This is the number
> which appears on the top right of the screen when you display spool file
> attributes.

When phrased in just this way, I'd say "with great difficulty."
The file number is one of the "keys" that distinguishes one spooled file 
from any other.  Without knowing that number, you can't point to a 
particular spooled file.  This sounds like you're either looking to pick 
from a list, or that you want to do something to the most recent spooled 
file generated (say from an RPG program.) If this is the case, check out 
the SPLNBR(*LAST) parameter/keyword that's available on the xxxSPLF 
commands.  This'll let you write a CL program like:

OVRPRTF QSYSPRT HOLD(*YES)
CALL rpgpgm   /* Create QSYSPRT output */
CPYSPLF FILE(QSYSPRT) TOFILE(QTEMP/PRTCPY) JOB(*) SPLNBR(*LAST)
DLTSPLF FILE(QSYSPRT) JOB(*) SPLNBR(*LAST)

If you need to pick from a list, look into the QUSLSPL API.
hth,

Buck Calabro
Commsoft, Albany, NY
mailto:mcalabro@commsoft.net

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.