Topic
2 replies Latest Post - ‏2013-02-17T20:48:44Z by scott_klement
JohnxLong
JohnxLong
43 Posts
ACCEPTED ANSWER

Pinned topic CU1 Character

‏2013-02-08T16:45:34Z |
Hi All,

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.

John
Updated on 2013-02-17T20:48:44Z at 2013-02-17T20:48:44Z by scott_klement
  • JohnxLong
    JohnxLong
    43 Posts
    ACCEPTED ANSWER

    Re: CU1 Character

    ‏2013-02-13T16:02:30Z  in response to JohnxLong
    Sorted it, X'27' seems to do the business
    • scott_klement
      scott_klement
      216 Posts
      ACCEPTED ANSWER

      Re: CU1 Character

      ‏2013-02-17T20:48:44Z  in response to JohnxLong
      Hi 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.