Topic: EBCDIC to ASCII (1 of 3), Read 29 times
Conf: Hex, Binary, EBCDIC
From: Ana Balan
Date: Wednesday, June 09, 2010 04:07 PM

Can I automatically convert an EBCDIC file, consisted of fixed-length records without end-of-record characters, into an ASCII file?

Thank you,


Topic: EBCDIC to ASCII (2 of 3), Read 26 times
Conf: Hex, Binary, EBCDIC
From: Pauli Lindgren
Date: Monday, June 14, 2010 04:40 AM

On 6/9/2010 4:07:43 PM, Ana Balan wrote:
>Can I automatically convert an
>EBCDIC file, consisted of
>fixed-length records without
>end-of-record characters, into
>an ASCII file?

What do you mean by "automatic"?

You can convert EBCDIC to ASCII manually with
Edit -> Translate -> Translate from EBCDIC

Or by using macro language command:
Translate_Block(0, File_Size, REVERSE)

These do not convert line-ends, but if you have fixed length records, there are no line-ends to convert.

However, it is not necessary to convert the file in order to edit it. Just select EBCDIC mode for example by pressing Alt-D 8 times.

It is not possible to detect EBCDIC file automatically by contents. However, you could save your EBCDIC files with some specific extension and then, after selecting the display mode, save file type specific configuration for that extension. After that, any EBCDIC file will be automatically displayed in EBCDIC mode.

Maybe it would be possible to translate the file automatically, too. It could be done by using file open event macro. The event macro would first check the extension and then execute the Translate_Block command. But it is probably easier just to convert manually when needed.



Topic: EBCDIC to ASCII (3 of 3), Read 29 times
Conf: Hex, Binary, EBCDIC
From: Ian Binnie
Date: Monday, June 14, 2010 06:34 AM

Normally Ted comments on EBCDIC requests, so I did not.

As Pauli said it is possible to view/edit EBCDIC files, but only if they are simple Pic X() or Pic 9().

If the content is more complex e.g. COMP fields, then Vedit can handle it, but only with the optional EBCDIC package.