Converting IS Data Structures with the COBOL Converter

Adapter services for the connection type "COBOL Converter" can be used to convert Integration Server data structures from/to a byte array representing the COBOL binary data. The IS data structure is described by a Software AG IDL File (with an optional server mapping file, see Server Mapping Files for COBOL), which is usually created using the IDL Extractor for COBOL. This applies to COBOL interface type Batch with Standard Linkage Calling Convention.

The COBOL Converter functionality can be used in scenarios where COBOL binary data is either already available in IS, or required by an IS service. One example is working with files that contain COBOL data. Another typical example is COBOL binary data with a complex structure consumed or produced by components such as the AS/400 Adapter or the WebSphere MQ Adapter.

The conversion depends on the signature of the generated adapter service:

  • Input Only
    If the adapter service has only input parameters (structure inRec) they are converted to a COBOL binary data structure (byte array) and stored in the output parameter cobolOutput.

  • Output Only
    If the adapter service has only output parameters (structure outRec) the COBOL binary data structure (byte array) contained in the input parameter cobolInput is converted to the output parameters.

  • Input and Output
    If the adapter service has both input and output parameters (structures inRec and outRec), input parameter cobolInput is checked:

    • If cobolInput is empty, the structure inRec is converted to a COBOL binary data structure (byte array) and stored in the output parameter cobolOutput.

    • If cobolInput is not empty, the contained COBOL binary data structure (byte array) is converted to the output parameters.