[Tutor] Converting EBCDIC characters to ASCII
Steve Bricker
bricker.steve at imonmail.com
Thu Nov 13 18:58:47 CET 2008
I see the scenario does not give enough to really allow someone to
formulate an answer. Allow me to clarify a bit. The three PD fields
are each 10 positions in length. Using the example below, a field
with X'0000000000000000014C' would need to be expanded to a
19-character field of '0000000000000000014'.
Steve Bricker
On Thu 13/11/08 10:14 , Steve Bricker bricker.steve at imonmail.com
sent:
I am trying to build an application for work that FTPs a file from
an IBM mainframe to my Windows desktop then process it. The
EBCDIC-to-ASCII conversion works nicely (using a BAT file I created)
except for three packed-decimal data fields (for example,
X'0000000000000000014C' is equal to integer 14). I am assuming I
need to go through this byte-by-byte to convert. Is that the best
approach, or is there a better way?
Steve Bricker
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20081113/07a5cb41/attachment.htm>
More information about the Tutor
mailing list