695 pts.
 getting I/O error CPF5004
hi, I am trying to write 10000 records from pf to printer file but after writing 200 or 300 records into printer file i am getting I/O error CPF5004 i know that this error i am getting because of page overflow indicator is not set it on but i am doing programming in rpgle i dont know how to overcome this problem can any one help me

Software/Hardware used:
ASKED: June 24, 2008  5:15 AM
UPDATED: June 24, 2008  12:42 PM

Answer Wiki:
Hi, You receive the overflow error, because you try to write too many records to one page. You need to skip on to the next page when your current page is full. You can check for an error when you do your write to your printer file, if you receive an error, then print a heading on the next page :- Write Print_Detail If %error Write Print_Header Endif In your DDS for your printer file, the Print_Header record format should have a SKIPA(1) or SKIPB(1) to force it to go the next page. Hope this helps, Martin Gilbert.
Last Wiki Answer Submitted:  June 24, 2008  8:44 am  by  Gilly400   23,625 pts.
All Answer Wiki Contributors:  Gilly400   23,625 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _