IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ASCII to character conversion


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Guptanagendra

New User


Joined: 10 Oct 2006
Posts: 6

PostPosted: Sat May 08, 2010 2:35 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat May 08, 2010 2:51 pm
Reply with quote

you should create a new topic

Quote:
known ascii say 65


what is the datatype of this known ascii?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat May 08, 2010 2:55 pm
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Sat May 08, 2010 5:09 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat May 08, 2010 7:59 pm
Reply with quote

Hello,

How did this ascii data get onto the mainframe?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sat May 08, 2010 9:21 pm
Reply with quote

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 icon_biggrin.gif
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Mon May 10, 2010 12:19 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts file manager is doing string conversion IBM Tools 3
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Panvalet - 9 Character name - Issue c... CA Products 6
Search our Forums:

Back to Top