Getting I/O error CPF5004

695 pts.
Tags:
CPF5004
I/O errors
RPG
RPGLE
Hi, I am trying to write 10000 records from pf to printer file but after writing 200 or 300 records into the printer file, I'm getting the I/O error CPF5004. I know I'm getting this error because the page overflow indicator is not set it. But I'm doing programming in RPGLE. I don't know how to overcome this problem. Can any one help me?

Answer Wiki

Thanks. We'll let you know when a new response is added.

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.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • JMoralesN
    I've had a problem like this, but I fixed checking these properties:
    Tamaño página                                 PAGESIZE          
      Longitud  . . . . . . . . . . . . . . . . :                 88
    Número de línea de desbordamiento . . . . . : OVRFLW      88

    10 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following