• 1 reply
  • Latest Post - ‏2013-11-25T09:57:43Z by VolkerFriedrich
17 Posts

Pinned topic Translate from EBCDIC to ASCII

‏2013-11-22T15:34:11Z |

I have a Windows server 2008 running C:D version 4.6. I have a file an  EBCDIC file I need to translate to text.

I'm trying to do this as part of a simple file copy process from one folder to the other. Both folders are on the D: drive of the C:D server.

In the "From Windows SYSOPS" dialog box I have specified  : datatype(binary)

In the "To Windows SYSOPS" dialog box I have sppecified : datatype(text) translate(yes)

This results in a conversion to Text, however the translated Text file appears as a single stream with no line feed at the end of each line.

The original file contains 4 columns of numbers. The translated file has all of the numbers just strung together.

What am I doing wrong here?


Thanks in Advance





  • VolkerFriedrich
    158 Posts

    Re: Translate from EBCDIC to ASCII


    Are you seeing the 4 columns when you view your source EBCDIC file in a Windows editor? If so, then it already has Windows CR/LF characters (=ASCII) and the following should do:
        FROM SYSOPS="datatype(text) xlate(no)"
        TO SYSOPTS="datatype(text) xlate(yes)"

    Otherwise you might be out of luck and the Windows file may not have that column information anymore. EBCDIC files usually do not contain end of line delimiters. Instead their layout is defined by the dataset format on the mainframe, for example  fixed block (=columns of same length). So you will have take of this and preserve the (column) structure at the time your are copying the file from the mainframe down to Windows.

    Also, your SYSOPTS are incorrect. The parameter is xlate(), not translate().