How To:
Edit EBCDIC Files

Article ID: HTCW050
Revision Date:08/24/00 
Version Number(s): 5.0 and above
Operating System: Windows
3rd Party Software: n/a
Database: n/a 
Author: HC


This document contains instructions for converting from EBCDIC to ASCII text to allow editing in CodeWright, and for converting back to EBCDIC. 

Thanks to:

Marcelo Aguisky
Software Engineer
marcelo.aguisky@iname.com


for contributing this dll and source code.

Setting it Up

To prepare for the text conversion, complete the following sections to obtain and load the appropriate DLL.

Obtain the DLL

Download the zip file a2e_e2a.zip from the Add-ons page of our web site. The zip file contains a2e_e2a.dll,which allows you to convert from EBCDIC to ASCII or from ASCII back to EBCDIC. It also contains source code to the DLL. 
Copy a2e_e2a.dll to your CW32 directory. 
How to load the DLL

To load a2e_e2a.dll, complete the following steps:

Select Customize | Libraries (versions 6.5 and above) or
Tools|Customize|Libraries (version 6.0) to display the Load CodeWright
DLL dialog.  Press the Add button and open a2e_e2a.dll.  Press OK. This
returns to the Load Libraries dialog, with a2e_e2a.dll displayed as a
user-defined library.  Using the Functions

BufferEBCDICToASCII (converts fromEBCDIC to ASCII)
BufferASCIIToEBCDIC (converts from ASCII back to EBCDIC)

You can:
Run either function from the Tools | API Command dialog.  Attach the
conversion functions to buttons, menu items, or keystrokes. 
