EBCDIC to ASCII file conversion

EBCDIC to ASCII file conversion

Post by Aidan Whit » Tue, 06 Sep 2005 19:38:19


We've been sent an EBCDIC file containing some sample data and an ASCII file
containing (supposedly) the same data.

I've used cygwin and UnixUtils' dd (with the conv=ASCII option) to verify
that we can routinely convert further EBCDIC files, and (perhaps
unsurprisingly)both apps generate the same output for the EBCDIC file
supplied. However, that output doesn't match the ASCII file they supplied.

Their e-mail came with the line "He created them as "fixed length" format (I
am sorry I don't know what he exactly means)."

All lines in the ASCII file they supplied (except the last) contain 451
characters, most of which contain zeroes for the 2nd half of the line. Every
character (again, execpt the square block in the very last line, viewing it
in Notepad) is a digit. In the output from dd, there are numerous instances
of a left brace, followed by nine 0's, followed by another left brace.

Does this sound like a familiar conversion problem to anyone? Is there an
option in 'dd' that will rectify this? If anyone's feeling charitable, I can
supply the data files we received.

I'm posting to this, and not a Linux forum, in the hope that it's more
valuable to know about EBCDIC than dd :-) Thanks!

--
Aidan Whitehall
 
 
 

EBCDIC to ASCII file conversion

Post by i5gu » Wed, 07 Sep 2005 00:33:30

Can you post a few records from both files? I am wondering if there is
packed data, i.e. the left brace is last byte in a x'00000000F' which
is packed 0

 
 
 

EBCDIC to ASCII file conversion

Post by Aidan Whit » Wed, 07 Sep 2005 16:30:47

> Can you post a few records from both files? I am wondering if there is

Sure -- attached (unless attachments are stripped, in which case you'll
hopefully get your e-mail copy).

I've also just received the data mapping. Characters 1~6 are an ID, 7~18 are
YYYYMMDDHHMM, etc etc, which would suggest the ASCII file is a valid
conversion.

Thanks for any pointers you can offer.

--
Aidan Whitehall
 
 
 

EBCDIC to ASCII file conversion

Post by Drew Dekre » Thu, 08 Sep 2005 08:27:05

Nothing to do with ASCII/EBCDIC: You're looking at overpunched decimal
signed numbers.
postive 120 comes out as 12{. Negative 120 comes out as 12}
see http://www.yqcomputer.com/
overview
 
 
 

EBCDIC to ASCII file conversion

Post by Aidan Whit » Thu, 08 Sep 2005 16:44:28

> Nothing to do with ASCII/EBCDIC: You're looking at overpunched decimal

Will do. Thank you!


--
Aidan Whitehall
 
 
 

EBCDIC to ASCII file conversion

Post by Aidan Whit » Thu, 08 Sep 2005 19:47:58

> Nothing to do with ASCII/EBCDIC: You're looking at overpunched decimal

Thanks Drew (and i5)... that link put me on the right path.

--
Aidan Whitehall