Package

za.co.absa.cobrix.cobol.parser

headerparsers

Permalink

package headerparsers

Visibility
  1. Public
  2. All

Type Members

  1. trait RecordHeaderParser extends AnyRef

    Permalink

    This trait represents a contract for record header parsers.

    This trait represents a contract for record header parsers. Usually each record of a multi-segment mainframe file has a 4 byte record descriptor word (RDW) header specifying length of each record. If this RDW header is no-standard a custom header parser can be provided to Cobrix to extract such records.

    To this you need to create a parser class that extends this trait and implement the header parser logic. Each concrete class inherited from this trait should be serializable because it need to be transferrable to executors when used from Spark framework.

    So the usual way implementing a custom record header parser is extends Serializable with RecordHeaderParser

    A record header parser for RDW is implemented in RecordHeaderParserRDW. This is a good starting point for implementing your own record header parser.

  2. class RecordHeaderParserFixedLen extends Serializable with RecordHeaderParser

    Permalink

    This is a parser for fixed length record files.

  3. class RecordHeaderParserRDW extends Serializable with RecordHeaderParser

    Permalink

    This is a parser for records that contain 4 byte RDW headers.

  4. case class RecordMetadata(recordLength: Int, isValid: Boolean) extends Product with Serializable

    Permalink

    Metadata required by record extractors to extract a record

    Metadata required by record extractors to extract a record

    recordLength

    The length of the record including header itself

    isValid

    If false the parser will skip the record and will jump to the next one

Value Members

  1. object RecordHeaderParserFactory extends Logging

    Permalink

Ungrouped