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



If you are trying to retrieve this from a list You may want to try this:
0002.00              PGM
0003.00              DCL        VAR(&JOB) TYPE(*CHAR) LEN(10)
0004.00              DCL        VAR(&USER) TYPE(*CHAR) LEN(10)
0005.00              DCL        VAR(&NBR) TYPE(*CHAR) LEN(6)
0006.00              DCL        VAR(&SPNBR) TYPE(*DEC) LEN(3)
0007.00              DCL        VAR(&SPNUM) TYPE(*CHAR) LEN(3)
0008.00              DCL        VAR(&OUTQ) TYPE(*CHAR) LEN(10)
0009.00              DCL        VAR(&OUTQLIB) TYPE(*CHAR) LEN(10)
0010.00              DCL        VAR(&FILE) TYPE(*CHAR) LEN(10)
0011.00              DCL        VAR(&PFILE) TYPE(*CHAR) LEN(10)
0012.00              DCL        VAR(&LFILE) TYPE(*CHAR) LEN(10)
0013.00              DCL        VAR(&IN03) TYPE(*CHAR) LEN(1)
0016.00              JOB(&JOB) USER(&USER) NBR(&NBR) OUTQ(&OUTQ) +
0017.00                           OUTQLIB(&OUTQLIB)
0027.00              CHGVAR     VAR(&LFILE) VALUE(&PFILE *TCAT 'L1')
0028.00              CLRPFM     FILE(QTEMP/&PFILE)
0029.00              MONMSG     MSGID(CPF3142)
0036.00
0037.00              CRTDUPOBJ  OBJ(QPRTSPL) FROMLIB(XXXLIB) OBJTYPE(*FILE)
+
0038.00                           TOLIB(QTEMP) NEWOBJ+(&PFILE)
0039.00              MONMSG     MSGID(CPF2130)
0040.00              WRKOUTQ    OUTQ(&OUTQLIB/&OUTQ) OUTPUT(*PRINT)
0041.00              CPYSPLF    FILE(QPRTSPLQ) TOFILE(QTEMP/&PFILE) +
0042.00                           JOB(&NBR/&USER/&JOB) SPLNBR(*LAST)
0043.00
0044.00              OVRDBF     FILE(QPRTSPL) TOFILE(QTEMP/&PFILE)
0045.00              OVRDBF     FILE(QPRTSPL1) TOFILE(QTEMP/&LFILE)
0046.00              CRTLF      FILE(QTEMP/&LFILE) SRCFILE(JHAGPL/QDDSSRC) +
0047.00                           SRCMBR(*FILE) AUT(*ALL)
0048.00              MONMSG     MSGID(CPF7302)
0049.00
0050.00              CALL       PGM(SPOOL) PARM(&FILE &NBR &USER &JOB
&SPNUM +
0051.00                           &IN03 &OUTQ &OUTQLIB &PFILE)
0052.00
0053.00              DLTF       FILE(QTEMP/&LFILE)
0054.00              DLTF       FILE(QTEMP/&PFILE)
Basically, copy all of your spool file entries (attributes)  (CPYSPLF in
41.00 ) from your outq into a work file.  (determined by the   RTVJOBA  in
16.00) The CRTDUPOBJ is just to use QTEMP so others can use it.  The work
file now contains all the attributes of each spool file entry. For my
purposes I created a logical to read it in the order that I wanted. The
called RPG program is just a subfile program that reads the work file and
when selected, passes the parms back to the CL. (I use the parm for the
logical to use more than one at a time with a counter (not shown..doesn't
apply here, in case you were wondering). I use this to pass spool files from
a remote when the comm setup isn't there to do a send. Then I pass it as a
DDM file and retrieve it at the other end.
-----Original Message-----
From: Saunders, Martin P <Martin.Saunders@capgemini.co.uk>
To: 'RPG400-L@midrange.com' <RPG400-L@midrange.com>
Date: Tuesday, September 08, 1998 9:05 AM
Subject: Spool file number


>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.
>
>TIA
>
>
>Martin
>
>(0171) 917 4002
>martin.saunders@capgemini.co.uk
>abc
>* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>* 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          *
>* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>







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