Mainframes often use a 256-bit character set called EBCDIC rather than the 128-bit ASCII character set most often used on Windows, Mac and UNIX platforms. MOVEit Automation can be used to convert text files from ASCII to EBCDIC or from EBCDIC to ASCII using the "CommandLineApp" built-in script and a command-line utility called "ebc2asc".
To convert EBCDIC text files to ASCII (or ASCII to EBCDIC) using MOVEit Automation:
Set up a file transfer task (one source and one destination) to download and save our original text file without converting it. If your source is a mainframe accessible via FTP, you may need to specify "BINARY" mode and you may also need to specify additional "QUOTE" commands to complete the transfer.
After you have the basic file transfer task working, add a "Command Line App" built-in process.
Configure "Command Line App" with the following parameters:
CommandLineApp_AppPath = C:\Program Files\MOVEit\ebc2asc.exe (or the actual location of this file)
CommandLineApp_OutputFile = Yes
EBCDIC to ASCII only: CommandLineApp_AppParms = <"[InputFile]" >"[OutputFile]"
ASCII to EBCDIC only: CommandLineApp_AppParms = -a <"[InputFile]" >"[OutputFile]"
Save these parameters and test. When checked, EBCDIC files should be unreadable using Notepad.exe, but ASCII files should be readable using Notepad.exe.
Sample Task - ASCII to EBCDIC
This task loads a local ASCII file (output from a defrag check) and converts it to an EBCDIC file.
These are the CommandLineApp parameters. Notice the "-a" argument.
Sample Task - EBCDIC to ASCII
This task loads a local EBCDIC file (the EBCDIC file created in the previous step) and converts it back to an ASCII file.
These are the CommandLineApp parameters. Notice there is no "-a" argument.