How to ignore Permanent I/O error on a Display

85 pts.
AS/400 errors
I/O errors
AS400 screen: I have a display program that displays text on a screen. More frequently users receive "Permanent I/O error" because there's an invalid character inbedded in the text field caused most likely from cut-n-paste. In one instance the character is hex 15. How can ignore this error and continue to display text on the screen?

Answer Wiki

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


This is caused by an undisplayable character – I think the only wat you can get around this is to replace the undisplayable character. Your device cannot phyically display the character – it’s not a program problem. Even the licensed programs like Query can’t display certain character combinations.


Martin Gilbert.

Also, you should be able to trap a session or device error using the MONITOR operation code (if you’re using RPG IV). Try putting a MONITOR block around your EXFMT or WRITE operation for the display file, and then you could add any error handling you wanted. The device errors I usually see are either the message IDs RNQ1251 or RNG1255, so you could add the appropriate one to an ON-ERROR section of the MONIITOR block.

Perhaps you could then attempt to find and remove the non-displayable characters and then redisplay the screen.


Discuss This Question: 4  Replies

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.
  • Sloopy
    In the program, replace the invalid characters by testing them against blank: If character < *Blank Eval character = *Blank EndIf You could, of course, make the character any displayable character you like. Regards, Sloopy
    2,195 pointsBadges:
  • abaltazar0725
    Found an easy fix to this:  Do a CHGDSPF and set the RSTDSP to *YES
    10 pointsBadges:
  • ToddN2000
    If this char cannot be displayed, you may not even be able to display it using STRDFU. Your only other options is to write a program to replace the have value with a valid one or fix the field using SQL. That is what we had to do here. People were cutting and pasting from office documents. If they cut and pasted 3 dots in a row it would convert to the ellipse a 1 char value.
    99,905 pointsBadges:
  • Splat
    Where exactly is this blowing up?  That will determine what steps you may be able to take. 

    Values below x'40' are used as control characters and may well be mucking up the data being returned to your program causing the error.
    12,260 pointsBadges:

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.

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


Share this item with your network: