Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How does a hex C1 represents an 'A'

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

New User


Joined: 25 Oct 2006
Posts: 24
Location: India

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

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

William Thompson

Global Moderator


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

PostPosted: Sat Feb 03, 2007 4:04 am    Post subject:
Reply with quote

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

Site Director


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

PostPosted: Sat Feb 03, 2007 4:49 am    Post subject:
Reply with quote

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

New User


Joined: 25 Oct 2006
Posts: 24
Location: India

PostPosted: Tue Feb 06, 2007 2:13 am    Post subject: Re: How does a hex C1 represents an 'A'
Reply with quote

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 icon_lol.gif
Got it now. Thanks for the info
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Tue Feb 06, 2007 3:55 am    Post subject:
Reply with quote

You're welcome icon_smile.gif
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:


Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us