Re: EBCDIC to ASCII file conversion
- From: Drew Dekreon <drew_dekreonATchugachelectricDOTcom>
- Date: Tue, 06 Sep 2005 15:27:05 -0800
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.discinterchange.com/TechTalk_signed_fields_.html for an overview
Aidan Whitehall wrote:
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!
.
- Follow-Ups:
- Re: EBCDIC to ASCII file conversion
- From: Aidan Whitehall
- Re: EBCDIC to ASCII file conversion
- From: Aidan Whitehall
- Re: EBCDIC to ASCII file conversion
- References:
- EBCDIC to ASCII file conversion
- From: Aidan Whitehall
- EBCDIC to ASCII file conversion
- Prev by Date: attn: helyn - truly great nntp groups - noz - (1/1)
- Next by Date: Re: Schedule BATCH job to run every 20 min.
- Previous by thread: Re: EBCDIC to ASCII file conversion
- Next by thread: Re: EBCDIC to ASCII file conversion
- Index(es):
Relevant Pages
|