COBOL Copybook Parser

In this article

Overview

You can use the Copybook Snap for consuming one or more COBOL Copybooks and a data stream to produce a JSON formatted message containing the structured payload.

 

  1. Provide one or more COBOL copybooks to the Copybook Parser Snap to process the data.

  2. Configure the Snap to indicate how the COBOL structures should be interpreted. Single or multiple copybooks can contain one or more structures to map the input data. The Snap must understand the level at which these structures should start in the COBOL copybook.

    1. If there is a single structure, no splitting of the Copybook is required.

    2. If there are multiple structures in the copybooks, typically, this will be at the 01 level; however, there are also options to split based on other levels.

  3. Configure the format of the records in the input file.

  4. Configure the code page in which the input character fields are encoded.

  5. Configure the endianness of the input binary fields.

  6. Configure optional settings such as whether strings should be wrapped in quotes or if blanks should be maintained at the start or end of strings.

  7. Run the Pipeline; the Snap produces a JSON document representing the input data file based on the specified COBOL structures.

Prerequisites

None.

Support for Ultra Pipelines

Does not support Ultra Pipelines.

Limitations and Known Issues

None.

Snap Views

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Input

Document

  • Min:0

  • Max:0

  • File Reader

  • Zip File Reader

The input to this Snap must be a flat binary file containing the data that must be mapped by the COBOL structure(s) provided as part of the configuration.

Output

Document

  • Min:1

  • Max:1

  • JSON Splitter

  • Sort Snap

The output is structured results in JSON format based on the data provided.

Error

Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter while running the Pipeline by choosing one of the following options from the When errors occur list under the Views tab:

  • Stop Pipeline Execution: Stops the current pipeline execution when the Snap encounters an error.

  • Discard Error Data and Continue: Ignores the error, discards that record, and continues with the rest of the records.

  • Route Error Data to Error View: Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap Settings

  • Asterisk (*): Indicates a mandatory field.

  • Suggestion icon ( ): Indicates a list that is dynamically populated based on the configuration.

  • Expression icon (): Indicates the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.

  • Add icon ( ): Indicates that you can add fields in the field set.

  • Remove icon (): Indicates that you can remove fields from the field set.

Field Name

Field Type

Description

Field Name

Field Type

Description

Label*

 

Default Value: Cobol Copybook Parser
Example: Process The 038 Copybook

String

Specify a unique name for the Snap. You can modify the default name especially if you have more than one of the same Snaps in your pipeline.

 

Copybooks*

Use this field set to define the Copybooks to use.

Copybook File*

 

Default Value: N/A
Example: PipeRecFileOfPS.json

String/Expression

Specify the Copybook file which describes the data. Alternatively, click the upload icon to browse and upload the desired copybook file.

 

Copybook Split*

 

Default Value: SPLIT_NONE
Example: SPLIT_01_LEVEL

String/Expression

Select the option to split the copybook for processing. The available options are:

  • SPLIT_NONE: No split.

  • SPLIT_01_LEVEL: Splits on all 01 levels.

  • SPLIT_TOP_LEVEL: Splits on the top-level structures defined by a level that is is greater than level 01.

  • SPLIT_REDEFINE: Splits on the highest level of COBOL REDEFINE structures.

  • If the Copybook contains multiple ‘01 entries’, it must be split for processing.

  • If the Copybook contains multiple structures below the 01 level, that must be used.

  • If the Copybook contains multiple ‘01 entries’, it must be split for processing.

  • If the Copybook contains multiple structures below the 01 level, that must be used.

Organization*

 

Default Value: IO_DEFAULT
Example: IO_UNICODE_TEXT

String/Expression

Specify the type of file organisation for the data payload. Alternatively click the Suggestion icon to fetch a list of file organisation types and select the desired organisation.

  • IO_DEFAULT: Attempt to automatically detect the file organisation.

  • IO_STANDARD_TEXT_FILE: Standard file using CRLF or LF as newline delimiter.

  • IO_UNICODE_TEXT: Unicode/double byte file using CRLF or LF as newline delimiter.

  • IO_FIXED_LENGTH: Every record (or line) is a standard fixed length based on the maximum record length (determined from copybook).

  • IO_CONTINOUS_NO_LINE_MARKER: Files where there are no End-of-Line markers. Records are based on Record-Lengths.

  • IO_VB: Mainframe VB (Variable Record length file). Records consist of a Record-Length including the length of the following data followed by the Record-Data.

  • IO_VLI: Mainframe like VB (Variable Record length file). Records consist of a byte swapper Record-Length excluding the length of the following data followed by the Record-Data.

Dialect*

 

Default Value: FMT_MAINFRAME
Example: FMT_INTEL

String/Expression

Specify the COBOL dialect. The available options are:

  • FMT_MAINFRAME: Mainframe COBOL (Big Endian).

  • FMT_INTEL: Intel COBOL (Little Endian).

  • FMT_FUJITSU: Fujitsu Cobol 3 compiler.

  • FMT_OPEN_COBOL: GnuCobol (formerly Open Cobol) on a Little-Endian machine.

  • FMT_OC_MICRO_FOCUS_B: GnuCOBOL running in Microfocus compatibility mode on a Big-Endian machine.

  • FMT_BIG_ENDIAN: Generic Big Endian.

The selected dialect determines how the parser deals with binary information in the input file.

Encoding*

 

Default Value: UTF8
Example: CP1252

String/Expression

Specify the format for encoding the input data. Any supported Java encoding is available for use. Some common code pages to be used:

  • CP1141: Standard mainframe EBCDIC code page.

  • ASCII: Standard ASCII files.

  • Windows-1252: Standard code page used on Windows platforms.

Enclose character values in quote

 

Default Value: Selected

Checkbox

Select this checkbox to wrap all character fields in single quotes. Many applications need to differentiate between character and numeric fields.

Compatibility


Default Value: Selected

Checkbox

Select this checkbox to maintain backward compatibility with the original version of the Snap. However, we recommend that you update your pipelines to handle the new format immediately, as this checkbox will be removed in a future release.

The key distinctions introduced with the Compatibility checkbox are:

  • A line element starts each output JSON record when the structure begins with a structure name. If you select this checkbox, the Snap does not output the JSON record.

  • When an array element only contains one item, the item is added. If you deselect this checkbox, an array is consistently generated regardless of the number of items in the array.

  • All items are treated as strings with varying attempts to turn to strings when numeric. If you deselect this checkbox, the Snap handles the field based on the data type indicated by the COBOL field type.

Truncate picX field spaces*

 

Default Value: BOTH
Example: OFF

String/Expression

Specify or select the setting that determines the blanks that are stripped off from a character field. The available options are:

  • OFF: No stripping of blanks will occur

  • BOTH: Blanks will be stripped from both the start of the data value and the end.

  • LEADING: Blanks will be stripped from the start of the data value.

  • TRAILING: Blanks will be stripped from the end of the data value.

Selection Criteria

Default Value: N/A
Example:

The following selection criteria would match:

REC-TYPE = “P” or “T” to the DETAIL record. 

REC-IND = “X1” and REC-TYPE = “T” to the TRAILER record.

<sc:selection xmlns:sc="http://www.snaplogic.com/namespaces/cobol/selectionCriteria"> <recordSelection> <name>DETAIL</name> <fieldSelection> <field name="REC-TYPE">P</field> <fieldSelection> <fieldSelection> <field name="REC-TYPE">T</field> </fieldSelection> </recordSelection> <recordSelection> <name>TRAILER</name> <fieldSelection> <field name="REC-IND">X1</field> <field name="REC-TYPE">T</field> </fieldSelection> </recordSelection> </sc:selection>

Button

The provision of XML selection criteria offers complex selection criteria. This is provided using an XML structure as described below.

Selection criteria must be provided in the Snap to match a data record to the copybook structure. The selection criteria is an XML-based configuration as follows:

<sc:selection     xmlns:sc="http://www.snaplogic.com/namespaces/cobol/selectionCriteria">     <recordSelection>         <name>STRUCTURE_NAME</name>         <fieldSelection>             <field name="FIELD_NAME">VALUE</field>         </fieldSelection>     </recordSelection> </sc:selection>

Where:

  • STRUCTURE NAME is the name of the structure containing the field.

  • FIELD NAME is the name of the field within the structure to be compared.

  • VALUE is the value to be compared. When this is equal to the FIELD NAME contents in a record being processed, this structure will be selected.

It is possible to have AND along with OR conditions:

  • <fieldSelection> elements are OR-ed

  • <field name> elements are AND-ed

Header Structure (for first record)

 

Default Value: N/A
Example: Header-record

String

Specify a Header record which is the first record in the file.

  • If the data being processed has a header, middle and/or trailer structure name then, specify the name of the header structure to process the first record of the file.

  • If the header structure is not provided, the specified middle structure interprets the first record from the file being processed.

Middle Structure Name (all records in between)

 

Default Value: N/A
Example: Detail-record

String

Specify one or more Middle records which contain the main data.

  • If the data being processed contains a header and/or a middle structure and/or a trailer structure name then, specify the name of the middle structure to be used to process the record(s) between the first and last records of the file.

  • If no middle structure is provided and a header structure name is provided, the specified header structure will be used to interpret the records subsequent to the first record of the file being processed.

Trailer Structure Name(for last record)

 

Default Value: N/A
Example: Trailer-record

String

Specify a Footer record which is the last record in the file.

  • If the data being processed contains a header and/or a middle structure and/or a trailer structure name then, specify the name of the trailer structure here to be used to process the record(s) between the last record of the file.

  • If no trailer structure is provided and a middle structure name is provided, the specified middle structure will be used to interpret the last record of the file being processed.

Configure error processing

Configure the action the Snap must take when an error occurs.

Set maximum acceptable number of errors

String

Set the maximum number of acceptable errors that can occur before the Snap terminates.

Zero (0) indicates no limit on errors that can be issued.

Configure field error processing

Use this field set to configure the Snap's action when an error ocucurs for each field.

Field Name

String/Expression/Suggestion

Specify or select the full name (this must include structure for uniqueness) of the COBOL field being configured.

Error processing configuration*

Expression/Dropdown list

Select or set the action the Snap must take when an error occurs when processing:

  • Fail: The pipeline processing fails immediately an error is encountered on this field. This is the default behavior of the Snap.

  • IgnoreField: The field is ignored and is not included in the output record.

  • IgnoreRecord: The entire record is ignored and not included in the output.

  • DefaultValue: The default value provided will be output for the field in the output record.

Default value for field

String/Expression

This is the value that will be output for a field when the DefaultValue is configured for the field.

Debugging configuration

Configure the debugging properties.

Name of only structure to output

String/Expression/Suggestion

Specify or select the name of the only structure for which data is to be sent to the output. Data for any other structure will be ignored and is not sent to the output.

Ranges of records to be output

Specify one or more ranges of records to be output.

Low record for range

String

Specify the first record in the range to be output.

High record for range

String

Specify the last record in the range to be output.

Snap Execution

 

Default Value: Validate & Execute
ExampleExecute only

Dropdown list list

Select one of the three modes in which the Snap executes:

  • Validate & Execute: Performs limited execution of the Snap, and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.

  • Execute only: Performs full execution of the Snap during Pipeline execution without generating preview data.

  • Disabled: Disables the Snap and all Snaps that are downstream from it.

Troubleshooting

Error

Reason

Resolution

Error

Reason

Resolution

"No copybooks provided or found in configuration"

At least one copybook must be configured for the Copybook Parser Snap.

Configure one or more Copybooks for the Snap.

"Header structure, middle structure or trailer structure cannot be specified with selection criteria"

A Header, Middle or Trailer structure has been specified along with the selection criteria for records.

Change the configuration to specify either the Selection criteria XML _OR_ one of more of the Header, Middle or Trailer structure configuration parameters.

"File : <file name> not found"

The file name provided for a Copybook cannot be found while trying to read the copybook file or files configured.

Review the configuration for the copy book files and ensure that they all exist and are accessible.

"Input protocol <protocol> not supported"

The protocol <protocol> provided for a copy book is not supported

Ensure the file names provided for each copybook use a supported protocol.

"No copybooks provided or found in configuration"

At least one copybook must be configured for the Copybook Parser Snap.

Configure one or more copybooks for the Snap.

"Failed to process copybooks due to: <error message>"

The Snap encountered difficulties while processing the provided copybooks using the available configurations, resulting in unsuccessful processing attempts.

Review the message provided in “<error message>” and correct the error highlighted there.

"Structure <name> not found in copybooks"

The structure name <name> has been provided as a configuration parameter but the structure does not exist in the copybooks provided.

Ensure that you provide the accurate copybooks or specify the correct structure name referenced to identify a structure included in the provided copybooks.

"Field <field name> not found in structure <structure name>"

The field was not found in the structure .

Correct the field name to reference the correct name in the named structure or the correct structure where the field name is defined.

"IO Error combining copybooks due to: <error message>"

A system error occurred combining multiple copybooks for processing.

Determine the problem based on the “<error message>” provided and correct the error.

"Range %d:%d overlaps with range %d:%d"

Multiple debug ranges have been provided and one range overlaps with another range.

Identify the range based on the ranges in the message and correct the overlap.

"Invalid range low record number <low> is higher than the high record number <high>

The lower range is higher than the higher range.

Correct the range specification so that the low range is less than or equal to the high range.

"Failed to parse XML selection criteria due to: <error message>"

An attempt to parse the XML provided in the selection criteria failed due to the error provided as “<error message>”.

Determine the problem with the XML based on the <error message> and correct the provided XML.

"Invalid error field configuration setting <setting> for field <field name>"

A field error configuration setting is invalid.

Correct the setting for the field configuration based on the suggestions provided in the configuration.

"I/O Error processing record <record number>, processing terminated"

An I/O error occurred while processing the record number.

Search for system or other errors during the runtime and correct the issue.

"Execution terminated as error count <error count> exceeded configured maximum error count <maximum errors>"

"Failed to process field <field name> due to <Error message>"

The Snap processing has terminated because the number of errors encountered while processing the data is more than the maximum errors configured.

 

Correct the errors that have occurred or increase the error threshold. You can increase the number of expected errors allowed by adjusting the maximum error configuration. By doing so, the Snap can complete its processing even if additional errors are encountered.

Snap fails to process any data.

The File Organization is incorrect.
For example, IO_FIXED_LENGTH is specified but the file contains CR/LF or LF characters. 

  • If a single COBOL structure is provided, the structure does not match the data provided as input.

  • If multiple COBOL structures are provided, the selection criteria have been specified incorrectly.

  • If header, middle and trailer structures are provided, they do not match the data.

The data must be manually inspected along with the COBOL structures to determine:

  • The specified file organization is correct.

  • For a single structure, the length of the COBOL structure must match the length of the data records.

  • For multiple structures, the matching criteria must identify the correct structure to be used and that structure must be of the same length as the data in that record.

  • For header, middle and trailer structures, the COBOL structures provided for each record do not match the first, middle or trailer records.

Snap processes some data but fails mid-way through the process.

This can be caused by any of the reasons where no data is processed so check these first.

Invalid packed decimal data has been encountered which causes an exception processing an individual data record.

  • Check all the possibilities included for when the Snap does not process any data.

  • Identify the record that is causing the failure. Work through the data based on the COBOL structure that should process this record and identify the invalid data.

Character data is invalid or contains single invalid data.

The encoding selected does not correctly reflect the encoding used for the input character data.

If the character data is totally corrupted, it suggests that you have selected an ASCII related encoding for EBCDIC input or vice versa. You can view a character field in the data to establish if the data is EBCDIC or ASCII encoded.

  • If the character data is legible but some characters are corrupted, it suggests that you have not selected the correct ‘flavor’ of the ASCII or EBCIDC encoding. For example, this may be that a US EBCDIC codepage is selected but the character data is Portuguese EBCDIC encoded.

Unable to determine structure for field names.

The COBOL structures that you have provided cannot support field configuration.

Contact SnapLogic Customer Support for more details.

Additional Information

The input to this Snap must be a flat binary file containing the data that must be mapped by the COBOL structure(s) provided as part of the configuration. This file will consist of data that have records with the following formats. For the records to be processed correctly, you must configure the correct record type processing for the records to be processed accurately:

  • Fixed Length records: Records with a consistent fixed length, the total length of the COBOL structure or structures configured for the Snap.

  • Records delimited by a carriage return/line feed (CR/LF) or just an LF: Records separated by CR/LF characters within the data. The data length between these CR/LFs may be fixed or variable and must be correctly represented by the length of the COBOL structure or structures configured for the Snap.

  • Variable blocked records: Variable length records created on IBM z/OS environments with an RDW before each record. This RDW includes the record length, including the length of the following data followed by the Record-Data.

  • Alternate variable blocked records: Records consist of a byte swapper record length excluding the length of the following data followed by the record data.

To ensure accurate processing of the data, you must configure the following types of data correctly:

  • Character data: This data should have a code page you must correctly specify in your configuration.

  • Binary data: These are binary numeric values with a specific endianness (the order in which the bits are transmitted over a communication channel) depending on the platform from which they have come.

    • Big Endian generally comes from older mainframe platforms (z Series, i Series, Solaris, etc.) and is where the high-order byte of the binary value is the most significant byte.

    • Little Endian generally comes from newer platforms (x86, x86-64, and so on) and is where the low-order byte of the binary value is the most significant byte.

Examples

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.

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 Copybook COBOL 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:

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.

First, we configure the File Reader Snap to accept the data for processing. In this case, we need to provide the filename and leave the other setting values defaulted.

Next, we must provide the Copybook COBOL Parser Snap with the Copybook structure file and settings required to parse the input data. To process this, the Snap must be configured to identify the structure to use for the first record (the header structure), the structure to use for the middle/detail records (the Middle Structure) and the structure to be used for the last record (the trailer structure).

Snap configuration settings:

  • Copybooks: CPL005.cpy is the copybook file containing the three COBOL structures to be used to process this data.

  • Copybook Split: As there are three COBOL Structures in the copybook, SPLIT_01_LEVEL indicates that the structures in the copybook must be split at the COBOL 01 level.

  • Organisation: The input file is interpreted based on the length it determines from the COBOL structure(s) provided. These are fixed length records. If a CR/LF or LF is found at the end of the record based on the length of the structures, this will be accommodated.

  • Dialect: The binary data in the input file is FMT_INTEL(LITTLE_ENDIAN).

  • Encoding: Character data in the Snap is encoded in codepage UTF-8.

  • Header Structure Name: This is the name of the COBOL structure in the provided copybook which will be used to interpret the first record in the input file.

  • Middle Structure Name: This is the name of the COBOL structure in the provided copybook which will be used to interpret the records between the first and last records in the input file.

  • Trailer Structure Name: This is the name of the COBOL structure in the provided copybook which will be used to interpret the last record in the input file.

The further options mean:

  • Character fields will not be enclosed in quotes.

  • Blanks will be truncated from the start and end of character fields.

  • The selection criteria is not provided as it is mutually exclusive with the Header, Middle and Trailer structure parameters.

 

The Pipeline is now ready to process the binary file and produce a JSON-formatted output. Following pipeline validation, we can preview the JSON formatted output:

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 to understand what record structure to use when a specific field (normally at the start of the record) contains different information to indicate the record type.

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 must provide the Copybook COBOL Parser Snap with the Copybook structure file and settings required to parse the input data:

Snap configuration settings:

  • Copybooks: CPL011.cpy is the copybook file containing the multiple COBOL structures to be used to process this data.

  • Copybook Split: As there are multiple COBOL Structures in the copybook, SPLIT_TOP_LEVEL indicates that the structures in the copybook must be split at the highest level. In this case, the top level is at the COBOL 05 level.

  • Organisation: The input file is interpreted based on the length it determines from the COBOL structure(s) provided.

  • Dialect: The binary data in the input file is FMT_BIG_ENDIAN(BIG_ENDIAN).

  • Encoding: Character data in the Snap is encoded in codepage cp037.

  • Selection Criteria: This is the XML selection document documented below.

The further options mean:

  • Character fields will not be enclosed in quotes.

  • Blanks will be truncated from the start and end of character fields.

  • Header Structure Name / Middle Structure Name /Trailer Structure Name: not provided as it is mutually exclusive with the Selection Criteria setting.

To process this, the Snap must be provided with the required selection criteria to differentiate between record types. To provide this, click the ‘Selection Criteria’ button in the settings and provide the XML selection criteria. This can be entered directly or provided in an XML file using the import option:

This is interpreted based on the ‘<recordSelection>’ XML node:

  • COBOL Structure HEADER will be used to interpret records found with the HEADER-RECORD-TYPE field containing the value ‘9998’.

  • COBOL Structure AH00-ACCOUNT-HISTORY-BASE will be used to interpret records found with the RECORD-TYPE field containing the value ‘200A’.

  • COBOL Structure AH01-ACT-CYCLE-HIST-INFO will be used to interpret records found with the RECORD-TYPE field containing the value ‘200B’.

  • COBOL Structure AH31-BALANCE-HISTORY-INFO will be used to interpret records found with the RECORD-TYPE field containing the value ‘200C’.

  • COBOL Structure AH32-TERMS-BALANCE-INFO will be used to interpret records found with the RECORD-TYPE field containing the value ‘200D’.

  • COBOL Structure AH35-TLP-HIS will be used to interpret records found with the RECORD-TYPE field containing the value ‘200E’.

  • COBOL Structure AH02-ACT-HIST-DETAIL-INFO will be used to interpret records found with the RECORD-TYPE field containing the value ‘200F’.

  • COBOL Structure TRAILER will be used to interpret records found with the TRAILER-RECORD-TYPE field containing the value ‘9999.

The Pipeline is now ready to process the binary file and produce a JSON-formatted output. Following pipeline validation, we can preview the JSON formatted output:

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. Often COBOL Structures have an array that can have a maximum number of entities. To save space, this was often restricted in the data to a specific number of array entries using the DEPENDSON COBOL structure.

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

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

The above configuration options specify the following:

  • Copybooks: CPL010.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 interpreted based on the length it determines from the COBOL structure(s) provided. These are fixed length records. If a CR/LF or LF is found at the end of the record based on the length of the structures, this will be accommodated.

  • Dialect: The binary data in the input file is FMT_INTEL(LITTLE_ENDIAN).

  • Encoding: Character data in the Snap is encoded in codepage UTF-8.

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.

  • No Header, Middle, Trailer structure name is provided.

 

Validate the Pipeline. You can view the JSON formatted output in the preview.

Reading a Binary file From the Enterprise Ecosystem

A standard implementation of a Copybook Snap Pipeline will look like this:

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

Configure the File Reader Snap as follows:

Configure the COBOL Copybook Snap as follows. This Snap uses the output from the upstream Snap:

The resultant JSON output can then be used from the Copybook Snap and passed into the downstream Snaps to achieve the desired result with the data.

Downloads

 

  File Modified

File Example_Copybook_Parser_Pipeline.slp

Apr 12, 2023 by Kalpana Malladi

Snap Pack History