Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

HEX to ASCII conversion

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
stalin.i@gmail.com

New User


Joined: 18 Apr 2005
Posts: 8
Location: chennai

PostPosted: Sun Apr 09, 2006 8:00 am    Post subject: HEX to ASCII conversion
Reply with quote

Can any one coded direct ASCII to COBOL conversion routines.

I prefer to do this using COBOL only. Please explain the logic briefly.

If you have assembler code for direct HEX to ASCII conversion. Please make it available to me.

Cheers,
Back to top
View user's profile Send private message

dneufarth

Active User


Joined: 27 Apr 2005
Posts: 239
Location: Cincinnati OH USA

PostPosted: Sun Apr 09, 2006 8:44 am    Post subject:
Reply with quote

do you mean EBCDIC to ASCII?
Back to top
View user's profile Send private message
stalin.i@gmail.com

New User


Joined: 18 Apr 2005
Posts: 8
Location: chennai

PostPosted: Sun Apr 09, 2006 9:46 pm    Post subject:
Reply with quote

no Dave. I want to convert HEX to ASCII conversion using COBOL or ASSEMBLER. I will be very happy if you can give me the logic or code or Both.

Thanks for your response.
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 239
Location: Cincinnati OH USA

PostPosted: Sun Apr 09, 2006 11:51 pm    Post subject:
Reply with quote

I'm confused; give us an example.

x'30' is 0 in ascii, so how would you expect to convert it?

x'F0' (0 IN EBCDIC) would become x'30' (0 in ASCII)
Back to top
View user's profile Send private message
stalin.i@gmail.com

New User


Joined: 18 Apr 2005
Posts: 8
Location: chennai

PostPosted: Mon Apr 10, 2006 11:30 pm    Post subject: Re: hex to ascii conversion
Reply with quote

input in hex "41414141'
output in ebcedic "AAAA"

I want to convert any given HEX value to equivalent EBCEDIC value
Back to top
View user's profile Send private message
stalin.i@gmail.com

New User


Joined: 18 Apr 2005
Posts: 8
Location: chennai

PostPosted: Mon Apr 10, 2006 11:32 pm    Post subject:
Reply with quote

Sorry Dave, I am little confused now. I will post a clear example later. icon_smile.gif
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 239
Location: Cincinnati OH USA

PostPosted: Tue Apr 11, 2006 3:38 am    Post subject:
Reply with quote

sounds like you want an ASCII to EBCDIC conversion.

INSPECT REPLACING is the COBOL command

TR is the assembler op code

see the specific language ref manual

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/igy3lr30/6.2.21?SHELF=&DT=20050714120224&
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 239
Location: Cincinnati OH USA

PostPosted: Tue Apr 11, 2006 6:46 am    Post subject:
Reply with quote

TR info is here http://publibz.boulder.ibm.com/epubs/pdf/a2278324.pdf
Back to top
View user's profile Send private message
stalin.i@gmail.com

New User


Joined: 18 Apr 2005
Posts: 8
Location: chennai

PostPosted: Tue Apr 11, 2006 9:40 pm    Post subject:
Reply with quote

Dave,

I used a existing assembler routines to do the job. Its works well. Thanks for all your sugessions.

I do have the EBCEDIC-ASCII table with me. I did not go for the inspect method because some valid HEX values do not have a equivalent EBCEDIC values.

Thanks again.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Apr 15, 2006 10:55 pm    Post subject:
Reply with quote

P.S. There are no invalid HEX values.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts Conversion of a VB file to FB. isssal DFSORT/ICETOOL 1 Mon Oct 31, 2016 10:23 pm
No new posts EBCDIC to ASCII conversion using OCOPY mistah kurtz All Other Mainframe Topics 5 Tue Sep 06, 2016 2:26 pm
No new posts Comparex utility to Syncsort conversion mistah kurtz SYNCSORT 11 Fri Jul 22, 2016 1:53 pm
No new posts changing z/os unicode conversion service meykh2014 All Other Mainframe Topics 0 Tue Jul 12, 2016 10:49 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us