|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
|
|
Data conversion. |
« View previous topic :: View next topic » |
Author |
Message
|
ramki |
Posted: Wed Oct 03, 2001 7:35 am Post subject: |
|
|
Apprentice
Joined: 25 Sep 2001 Posts: 28
|
I am converting data from Ascii(unix) to EBCIDC(MF).
Does EBCDIC mean packed decimal in MF.
One you give me one example of converting a float from ASCII to PAcked decimal+EBCDIC.
I am trying to test my MQSI code, but I am not able to figure out if the conversion is taking place correctly or not.
Thanks in advance for your help.
|
|
Back to top |
|
|
kolban |
Posted: Wed Oct 03, 2001 9:50 am Post subject: |
|
|
Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
Ouch ... lots of concepts here.
First of all, ASCII and EBCDIC and encodings of character data. This says what byte value shall represent a "character". For example, in ASCII the code for the character '0' is 0x30 while in EBCDIC, the code for the same character is 0xF0.
This ONLY refers to character data.
When it comes to representing binary numeric data, there are many options. The most common (today) is 32 and 64 bit signed integers. Unfortunately, this also leads to problems ... should the most significant bits be the first byte or the last.
Packed decimal is an older encoding heavily used by COBOL and mainframe. It takes the decimal number and encodes each digit in 4 bits of a byte. For example, the integer:
1234 would be represented in packed decimal as 0x1234. There are more variations on this including signed and unsigned and more.
Floating point numbers are even more convulted.
I think you need to explain and understand what kinds of data you are dealing with and on what platforms. |
|
Back to top |
|
|
ramki |
Posted: Wed Oct 03, 2001 2:48 pm Post subject: |
|
|
Apprentice
Joined: 25 Sep 2001 Posts: 28
|
|
Back to top |
|
|
|
|
|
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|