Copybook Snap Pack examples

The following examples demonstrate how to use Snaps in the Copybook Snap Pack.

Example Snaps used
Cobol Copybook Parser

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.

Processing an ASCII Binary Input File with Fixed Length Records and Trailer Record

The following example demonstrates a standard file structure where the input file consists of a header as the first record, one or more detail records in the middle, with the last record being a trailer record.

Processing an ASCII Input Binary File with Fixed Length Records

This example demonstrates another common file structure where different COBOL structures describe different record types in the same file. The Snap must be configured using an XML selection structure.

Processing ASCII Binary Input File with Data Mapped by a COBOL Structure with Array

This example pipeline demonstrates how to process ASCII binary data with the data mapped by a COBOL structure with an array.

Reading a Binary file From the Enterprise Ecosystem

This example Pipeline demonstrates how to read a binary file from the enterprise ecosystem with a sample definition.

Cobol Copybook Formatter

Process a Single JSON-formatted Record

This example demonstrates how to use a single COBOL Structure defined with a JSON format being processed from JSON to COBOL formatted output for postprocessing by a downstream Snap.

Process multiple JSON-formatted records

This example demonstrates how to use a multi-record COBOL structure defined with a JSON format processed from JSON to COBOL format output using the JSON Parser and Cobol Copybook Formatter Snaps.

Process JSON-formatted records with header and trailer details

This example demonstrates how to process the COBOL structure containing header and trailer definitions defined in a JSON format.