Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
vishabus

New User

Joined: 25 Oct 2006
Posts: 24
Location: India

Posted: Sat Feb 03, 2007 3:33 am    Post subject: How does a hex C1 represents an 'A'

Hi,

When we do a hex on we are able to see hex values of the data in a file.
An example:
 Code: 0INVOCATION PARAMETERS: FCDEDCCECDD4DCDCDCECDE7 0955631396507191453592A

How is this conversion done? I mean how does a hex C1 represents an 'A'?

I remember doing decimal to hex coversion and vice versa but can someone guide me with the above conversion.

Thanks,
Vishwajeet

William Thompson

Global Moderator

Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

 Posted: Sat Feb 03, 2007 4:04 am    Post subject: It is not like converting from decimal to octal or hexadecimal. C1 is the hex value of the letter "A" in EBCDIC, Do you have a "green card"? Basically, when a hex value is sent to an EBCDIC aware output device, that hex value is displayed as the appropriate character. If a hex 43 was sent to an EBCDIC aware output device you would see pretty much nothing, but if that 43 was sent to a ASCII aware output device, you would see the letter "C". If you are asking questions at this level, fine a green card, it will help a lot.
dick scherrer

Site Director

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

 Posted: Sat Feb 03, 2007 4:49 am    Post subject: Hi Vishwajeet, In both EBCDIC and ASCII systems, one byte is made up of 8 bits, so the value for one byte can be from binary 0000-1111 which is hex 00-FF making 256 possible combinations. What you see in tso when you turn hex on is the actual character (if it is a displayable character) and the hex value that makes up that character. Each is unique - when you turn hex on, you will NOT see 2 different hex values that show as a C. The ASCII and EBCDIC character sets are NOT the same which is why there are often issues moving data from one platform to the other. As to why hex C1 is the capital A - that is the way it was designed. If you look around on the web, you can find both the ASCII and EBCDIC character sets. If you find info on 7-bit ASCII, you can pretty much skip over that.
vishabus

New User

Joined: 25 Oct 2006
Posts: 24
Location: India

 Posted: Tue Feb 06, 2007 2:13 am    Post subject: Re: How does a hex C1 represents an 'A' Thanks a lot for your responses William and Scherrer. I had completely forgotten EBCDIC character set funda. I was trying to convert the HEX to DEC and then looking up at ASCII table Got it now. Thanks for the info
dick scherrer

Site Director

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

 Posted: Tue Feb 06, 2007 3:55 am    Post subject: You're welcome
 All times are GMT + 6 Hours
 Page 1 of 1
 Search our Forum:

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us