View previous topic :: View next topic
|
Author |
Message |
HABBIE
New User
Joined: 08 Jul 2014 Posts: 24 Location: INDIA
|
|
|
|
Hi,
I need to convert some EBCDIC format to ASCII format on linux. I am using through DD statement on linux but it is failing for packed decimals.
Is there any command prompt that can be run on linux for my conversions from EBCDIC to ASCII formats. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
EBCDIC if for "text" and control characters. ASCII is for "text2 and control characters.
Why can't you see any reference to packed-decimal, floating-point, binary? Because they are neither EBCDIC nor ASCII. Their values can easily overlap with textual data. If your data contains "non-text" fields, then you will screw it up if you do EBCDIC to ASCII (or ASCII to EBCDIC).
Now, what was your problem? Oh, yes, screwed-up data. Only way you'll do it without suspect practices is to convert all your "non-text" fields to "text". Simple.Two-minute job. Then EBCDIC to ASCII is fine. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
iconv will convert EBCDIC to ASCII and vice versa. However, if you use it on a data set with packed decimal data, your data WILL be changed in ways you do not want. You only want to convert from EBCDIC to ASCII when there are no binary nor packed decimal data in any record. |
|
Back to top |
|
|
|