Hello.
My display file crashes as it can not display the hexadecimal values in my character field. Is there an easy way to replace these values (like scan) in my 79 character long field that has valid characters mixed with hexadecimal values? (Please no APIs)
Thank you in advance.
Regards
Steven
Software/Hardware used:
iSeries RPG
ASKED:
September 29, 2010 10:47 AM
UPDATED:
September 30, 2010 2:41 PM
%xlate could be used to translate all bad characters to good characters, but I figured it was easier to create a list of all valid characters rather than a list of all invalid ones.
Hello BigKat.
Thank you for the prompt response, I will give it a bash in the morning, it is sunset here in RSA.
How does query display/report the values, even if it is garbage. Could the same technique not be used?
Regards
Steven
query does a character substituition for unprintable characters at the system level. It is not a function that you can call (as far as I know)
For this line:
d replCharacter c const(' ')…consider making this change:
The Character Data Representation Architecture (CRDA) specifies the ’3F’X character as a replacement character. It should show up as a reverse-image block on the display.
Tom
You can loop through the characters in the string. Replace any byte that is less than x’3F’ with x’3F’.
Tom
if you do Tom’s suggestion
you need to change
to
doh!
Tom’s suggestion of