Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 (blue star) 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 (blue star) 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.

ComatibilityCompatibility


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’ 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.

Code Block
<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:

Code Block
<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’ STRUCTURE NAME is the name of the structure containing the field.

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

  • ‘VALUE’ 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.

The numbers here are relative to 1, so 1 is the first record, 2 is the second record.
If the ranges include records which don’t exist in the input data, these will simply be ignored.
If ranges overlap, this will cause a configuration error.

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.

...