I need to send an ascii 'ESC' (hex 1B) to an application, I'm using QDCXLATE to translate between ebcidic and ascii, the Ebcidic equivalent of 'ESC' is CU1, how do I code a character representation of 'CU1' so it can be converted?
Thanks in advance.
This topic has been locked.
2 replies Latest Post - 2013-02-17T20:48:44Z by scott_klement
Pinned topic CU1 Character
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-02-17T20:48:44Z at 2013-02-17T20:48:44Z by scott_klement
JohnxLong 270001H26F43 Posts
scott_klement 2700007QFX216 PostsACCEPTED ANSWER
Re: CU1 Character2013-02-17T20:48:44Z in response to JohnxLongHi John,
x'27' is the Escape character (not CU1) in EBCDIC. I think you already came to that conclusion...
FWIW, if you're using QDCZLATE (which I do not recommend) then which character translates to which will depend on which translation table you're using. And if you want to look up what the translations are, it's really quite easy to look at the table and see what the translations are.
For example, if you wanted to see the QTCPASC table, you could:
WRKTBL TBL(QTCPASC) -- now take opt 5=Display
In this example, you can see that x'27' translates to ASCII X'1B'.
However, it's important to remember that there are many different flavors of EBCDIC... they're not all the same. Likewise, there are many different flavors of ASCII. You should endeavor to know precisely which flavor of EBCDIC/ASCII you want to work with. If you know the CCSID number of each, then translation becomes very easy, just plug in the right CCSIDs, and it's pretty much done for you.