|
If you are using RPGIII then you need to code an indicator in LO for each write operation to the print file, monitor for this indicator on after a write to know when to put your headings out. If you are using RPGIV the use the Write(E) opcode and monitor for %ERROR to trap overflow. Bryan Raja Rajendren wrote: > When I tried to print using RPG/400 to a PRTF (RLU). After writing 60 lines > to the spool file, program ends up with the following error > > Error Msg: > ----------- > CPF5004 I/O error was detected in GLRP01 (C G S D F). > > Message Conten: > --------------- > Message . . . . : CPF5004 I/O error was detected in GLRP01 (C G S D F). > > Cause . . . . . : The RPG program GLMRPT in library CGSSRC received the > > message CPF5004 at statement 6100 while doing WRITE I/O operation on file > > GLRP01. Actual file is CGSDTA/GLRP01 MEMBER - Q878515622. See the job log > > for a complete description of message CPF5004. > > Recovery . . . : Enter C to cancel, G to continue processing at *GETIN, S > > to obtain a printout of system storage, D to obtain an RPG formatted > > printout of system storage, or F to obtain a full formatted printout of > > system storage. > > How to rectify this problem. But I'm very clear that this problem is due to > some over flow indicators. How to trap it. I've list my program down. Can u > pls find the problem. This is the first time I'm trying the print option. > > Expecting your quick reply. > > Thaning you, > > Regards, > Rajendren K. G. > > FGLRP01 O E PRINTER > FGLMLF IP E DISK > * > C *ENTRY PLIST > C PARM CURUSR 3 > C PARM NFRMDT 80 > C PARM NTODAT 80 > C PARM RCDTYP > C PARM COUNT > * > C *IN65 IFEQ *OFF > C Z-ADD0 LCNT 40 > C MOVE CURUSR PUSR > C EXSR WRTHDR > C SETON 65 > C ENDIF > * > C *INLR IFEQ *ON > C EXSR WRTFTR > C ENDIF > * > C NLR EXSR WRTCNT > C ADD 1 LCNT > * > C LCNT IFGT 60 > C Z-ADD0 LCNT > C EXSR WRTHDR > C ENDIF > C************************************************************** > C *INZSR BEGSR > C Z-ADD0 COUNT 80 > C ENDSR > C************************************************************** > C WRTHDR BEGSR > C NFRMDT IFGT 0 > C CALL 'CNVDAT' > C PARM NFRMDT > C PARM FRMDAT > C ENDIF > C NTODAT IFGT 0 > C CALL 'CNVDAT' > C PARM NTODAT > C PARM TODAT > C ENDIF > C WRITERCD001 > C WRITERCD007 > C WRITERCD002 > C WRITERCD005 > C WRITERCD003 > C WRITERCD004 > C WRITERCD005 > C ADD 7 LCNT > C ENDSR > C************************************************************** > C WRTFTR BEGSR > C WRITERCD005 > C ENDSR > C************************************************************** > C WRTCNT BEGSR > C EXSR MAKFMT > C WRITERCD006 > C ADD 1 COUNT > C ENDSR > C**************************************************************C > WRITERCD005 > C ADD 7 LCNT > C ENDSR > C************************************************************** > C WRTFTR BEGSR > C WRITERCD005 > C ENDSR > C************************************************************** > C WRTCNT BEGSR > C EXSR MAKFMT > C WRITERCD006 > C ADD 1 COUNT > C ENDSR > C************************************************************** > C MAKFMT BEGSR > C MOVE *BLANKS FCTDT > C MOVE *BLANKS FCHDT > C MAKFMT BEGSR > C MOVE *BLANKS FCTDT > C MOVE *BLANKS FCHDT > xx xx x x x x x > x x x x x x x x x > (some goes here) > C************************************************************** > > ____________________________________________________________________ > Get free email and a permanent address at http://www.netaddress.com/?N=1 > +--- > | This is the RPG/400 Mailing List! > | To submit a new message, send your mail to RPG400-L@midrange.com. > | To subscribe to this list send email to RPG400-L-SUB@midrange.com. > | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. > | Questions should be directed to the list owner/operator: david@midrange.com > +---
begin:vcard n:Yates;Bryan tel;fax:972-548-4494 tel;work:972-548-4584 x-mozilla-html:TRUE url:www.co.collin.tx.us org:Collin County Government;Information Services adr:;;210 S. McDonald, Suite 510;McKinney;Texas;75069;United States version:2.1 email;internet:srprog3@co.collin.tx.us title:Senior Programmer/Analyst fn:Bryan Yates end:vcard
As an Amazon Associate we earn from qualifying purchases.
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.