in reply to Converting Mainframe EBCDIC data
What are the byte-values in the COMP strings? Most likely they got corrupted during transfer. It seems that Convert::IBM390 provides a hexdump function to see the byte values.
The hex output for the BCD numbers should be (or quite close to):
00 06 79 24 3F
Personally, I prefer the manual approach of using substr to get at the bytes and then Encode::decode to convert strings from CP1047 if needed. I also unpack the BCD numbers manually.
If the module works for you in other cases, most likely the data went bad.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Converting Mainframe EBCDIC data
by Anonymous Monk on Sep 27, 2013 at 11:06 UTC | |
by Corion (Patriarch) on Sep 27, 2013 at 11:34 UTC |