Using Data Conversion Modules with MFFTP

If you are required to perform some type of translation of data before sending a file or after receiving it, there are several options that you can use.

You can call MFFTP with a parameter stating that a conversion module should be used (for example, EXIT TRAN ASC2EBC), which would call the in-built ASCII to EBCDIC module. This would translate the file from ASCII to EBCDIC if the ftp action is PUT; the same module would be called to translate the received file from EBCDIC to ASCII if the ftp action is GET. Conversely, the in-built EBC2ASC module performs the reserve of these actions: EBCDIC to ASCII on PUT and ASCII to EBCDIC on GET).

You can also specify these data conversion modules using the SBDATACONN or MBDATACONN parameters of the LOCSITE command:

LOCSITE ENCODING=SBCS
LOCSITE SBDATACONN=ASC2EBC

If you need to perform any other type of translation, you can write your own conversion module - see Writing Your Own Data Conversion Module.

The jcl-examples section of the Samples Browser contains two sample conversion modules and the jobs required to run them.