Processing a Single COBOL Structure using EBCDIC Binary File input from a Variable Blocked File

This example demonstrates using a single record format described by a single COBOL Structure being processed from a binary file to a JSON formatted output for postprocessing by a downstream snap.

Download this Pipeline

First, we configure the File Reader Snap to accept the data for processing. Provide the filename and leave the other settings with default values.

Next, we configure the Cobol Copybook Parser Snap with the Copybook structure file and the settings required to parse the input data.

Snap configuration settings:
  • Copybooks: CPL008.cpy is the copybook file containing the COBOL structure to be used to process this data.
  • Copybook Split: As there is only one COBOL Structure in the copybook, no splitting of structures is required.
  • Organisation: The input file is an IBM Mainframe Variable Blocked file.
  • Dialect: The binary data in the input file is FMT_MAINFRAME (BIG ENDIAN)
  • Encoding: Character data in the Snap is encoded in codepage cp037.
The further options mean:
  • Character fields will not be enclosed in quotes
  • Blanks will be truncated from the start and end of character fields.
  • No selection criteria are needed or provided as the input file only contains one type of record.
  • For the same reason, no Header, Middle, Trailer structure name is provided.

Validate the pipeline. You can preview the JSON formatted output: