Cobol Copybook Parser
The Directory and Wildcard properties of the associated File Reader must specify the path to and names of the data files.
The output type is JSONNodeEvent.
Cobol Copybook Parser properties
property | type | default value | notes |
---|---|---|---|
Copybook Dialect | String | Mainframe | Select the value that matches the system on which the files were created: BigEndian, Fujitsu, Intel, Mainframe, MicroFocus, or OpenCobol |
Copybook File Format | enum | USE_STANDARD_COLUMNS | Supported values:
|
Copybook File Name | String | The fully qualified name of the .cpy file that describes the contents of the data files. | |
Copybook Split | enum | Level01 | How the records in data file are mapped to records in the copybook. Supported values:
|
Data File Font | String | UTF8 | The character set of the data files. |
Data File Organization | enum | UnicodeText | Supported values:
|
Data Handling Scheme | enum | ProcessRecordAsEvent | With the default value, ProcessRecordAsEvent, each record will be output as a separate event. Set to ProcessFileAsEvent to have all records in each file output as a single event. |
Group Policy | For documentation of this feature, Contact Striim support. | ||
Process Copybook File As | SingleEvent | Set to MultipleEvent to enable Group Policy. | |
Record Selector | String | When the Copybook Split value is Level01 or HighestRepeating options, specify a set of mappings of record and field value to record type. | |
Skip Indent | Integer | 0 | If the contents of the data files are indented, specify the number of characters to skip on each line before reading data. |
Cobol Copybook Parser example
CREATE SOURCE ReadCobol USING FileReader ( directory:'docs/CobolCopybookParser', WildCard:'ACCTSD', positionByEOF:false ) PARSE USING CobolCopybookParser ( copybookFileName : 'docs/CobolCopybookParser/ACCTS.cpy', dataFileOrganization: 'Text' ) OUTPUT TO CobolParserStream;
For a complete example including TQL file, copybook, and data, download CobolCopybookParser.zip from https://github.com/striim/doc-downloads.
If you encounter any errors or other issues using this parser, please Contact Striim support.