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



First things First: Also note that on V5R1, the layout of the spool file is
a little different.

1. create a physical file defining the layout of the spool:

     A          R SPLREC                                                
     A            FILLER1        1A                                     
     A            FMFILE        10A                                     
     A            FILLER2        1A                                     
     A            FMUSR         10A                                     
     A            FILLER3        1A                                     
     A            FMUSRDATA     10A                                     
     A            FILLER4        2A                                     
     A            FMSTATUS       3A                                     
     A            FILLER5        2A                                     
     A            FMPAGES        6S 0                                   
     A            FILLER6        4A                                     
     A            FMCOPIES       2A                                     
     A            FILLER7        2A                                     
     A            FMTYPE        10A                                     
     A            FILLER8        1A                                     
     A            FMPTY          2A                                 
     A            FILLER9        5A                                 
     A            FMSPLFNBR      4S 0                               
     A            FILLER10       5A                                 
     A            FMJOB         10A                                 
     A            FILLER11       1A                                 
     A            FMNUMBER       6A                                 
     A            FILLER12       1A                                 
     A            FMDATE         8A                                 
     A            FILLER13       1A                                 
     A            FMTIME         8A                                 
     A            FILLER14      17A                                 

2. then create a logical file over the physical file:

     A          R SPLREC                    PFILE(SPLFILEPF)            
     A            FMFILE        10A                                     
     A            FMUSR         10A                                     
     A            FMUSRDATA     10A                                     
     A            FMSTATUS       3A                                     
     A            FMPAGES        6S 0                                   
     A            FMCOPIES       2A                                     
     A            FMTYPE        10A                                     
     A            FMPTY          2A                                     
     A            FMSPLFNBR      4S 0                                   
     A            FMJOB         10A                                     
     A            FMNUMBER       6A                                     
     A            FMDATE         8A                                     
     A            FMTIME         8A                                     
     A          K FMFILE                                                
     A          O FMTYPE                    COMP(EQ 'eue       ')      
     A          O FMTYPE                    COMP(EQ 'Form Type ')      
     A          O FMTYPE                    COMP(EQ ' * * *    ')      

3. then create a CL program to read the logical file:

             PGM        
                                                                        
            DCLF       FILE(SPLFILELF)                                 
                                                                       
            MONMSG     MSGID(CPF0000)                                  
                                                                       
            OVRPRTF    FILE(QPRTSPLQ) HOLD(*YES)                       
            WRKOUTQ    OUTQ(&FMLIB/&FMQUEUE) OUTPUT(*PRINT)            
            CPYSPLF    FILE(QPRTSPLQ) TOFILE(SPLFILEPF) SPLNBR(*LAST)  
                                                                       
STRFORM:    RCVF       RCDFMT(SPLREC)                                  
            MONMSG     MSGID(CPF0864) EXEC(GOTO CMDLBL(ENDEOF))        
                                                                       
            SBMJOB     CMD(CHGSPLFA FILE(&FMFILE)
JOB(&FMNUMBER/&FMUSR/&FMJOB) +                     
                         SPLNBR(&FMSPLFNBR)) JOB(CHGSPLDTA) OUTQ(XXXXXXXXXX)
<----- output queue name          
                   
            GOTO       CMDLBL(STRFORM)                                 
                                                                        
 ENDEOF:     DLTSPLF    FILE(QPRTSPLQ) SPLNBR(*LAST)                    
             DLTOVR     FILE(QPRTSPLQ)                                  
             RETURN                                                     
             ENDPGM

Steven Segars
AS/400 Systems Administrator
CSX Technology
Work: 904-633-5650
Fax:   904 633-1051



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.