View previous topic :: View next topic
|
Author |
Message |
Guptanagendra
New User
Joined: 10 Oct 2006 Posts: 6
|
|
|
|
Can Anybody tell me how to convert ASCII to a character. I want Character equivalent of a known ascii say 65 which should return 'A' for me.
I tried CHR SQL function, but it is giving error. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you should create a new topic
Quote: |
known ascii say 65 |
what is the datatype of this known ascii? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Guptanagendra wrote: |
Can Anybody tell me how to convert ASCII to a character. I want Character equivalent of a known ascii say 65 which should return 'A' for me. |
What did a google search return |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Guptanagendra wrote: |
Can Anybody tell me how to convert ASCII to a character. I want Character equivalent of a known ascii say 65 which should return 'A' for me.
I tried CHR SQL function, but it is giving error. |
If I'm understanding you correctly, you would build your FROM-TABLE using ASCII data and build your TO-TABLE with your equivalent EBCDIC data and issue an INSPECT "data to be converted" CONVERTING FROM FROM-TABLE TO TO-TABLE.
Bill |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
How did this ascii data get onto the mainframe? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
for character conversion the wisest thing would be to investigate the LE functions for code page translation
as usual the issue is due to poor design of the data exchange process between different architectures |
|
Back to top |
|
|
Kjeld
Active User
Joined: 15 Dec 2009 Posts: 365 Location: Denmark
|
|
|
|
Check with your shop if they already have routines at hand for converting ASCII to EBCDIC.
You should verify if the codepage used on the sending (ASCII) system matches the translation table. I will assume that the EBCDIC table offered (teh TO-values) will match the code page of the receiving system. |
|
Back to top |
|
|
|