TransactionParser - v0.3.1
    Preparing search index...

    Interface IParsingEvent

    IParsingEvent interface is a helper interface to define the events that are submitted during parsing of a copybook and the data of these events.

    interface IParsingEvent {
        end: { copybook: string; parsedCopybook: DataItem[] };
        endLine: {
            copybook: string;
            line: string;
            newItem: { item: DataItem; level: number };
            parsedItems: { item: DataItem; level: number }[];
        };
        newLine: {
            copybook: string;
            line: string;
            parsedItems: { item: DataItem; level: number }[];
        };
        start: { copybook: string; preparedData: string[]; rawData: string };
    }

    Hierarchy (View Summary)

    Index

    Properties

    end: { copybook: string; parsedCopybook: DataItem[] }

    Fired at the end of parsing a copybook Returns the following values:

    • copybook: Path of the copybook
    • parsedItems: Array of DataItem after any post processing (resolve absolute offsets, redefines and occurs)
    endLine: {
        copybook: string;
        line: string;
        newItem: { item: DataItem; level: number };
        parsedItems: { item: DataItem; level: number }[];
    }

    Fired at the end of every line from the copybook that is parsed. Returns the following values:

    • copybook: Path of the copybook
    • line: Currently processed line from the copybook
    • newItem: Object representing the current line as level and DataItem
    • parsedItems: Array of objects of parsed lines, represented by level and DataItem

    newItem is also included in parsedItems

    newLine: {
        copybook: string;
        line: string;
        parsedItems: { item: DataItem; level: number }[];
    }

    Fired at the beginning of every line from the copybook that is parsed. Returns the following values:

    • copybook: Path of the copybook
    • line: Currently processed line from the copybook
    • parsedItems: Array of objects of parsed lines, represented by level and DataItem
    start: { copybook: string; preparedData: string[]; rawData: string }

    Fired at the beginning of parsing a copybook Returns the following values:

    • copybook: Path of the copybook
    • rawData: string containing the data of the copybook before any modifications
    • preparedData: Array of strings containing the lines to be parsed

    preparedData is rawData splitted on every new line, tabs replaced with . Only includes lines that are not empty