TransactionParser
    Preparing search index...

    Class Transaction

    The Transaction class represents a single line in a transactions file (package) that is represented by a copybook.

    A transaction requires a parsed copybook to be able to store data in the resulting DataItem's

    Implements

    Index

    Constructors

    Methods

    • Get a specific copybook item based on the name of the item

      Parameters

      • name: string

        Name of the copybook item

      Returns ICopybookItem | undefined

      copybook item

      It is possible that due to an occurs class, mutliple data items with the same name exist. Only the first occurance will be returned. Using the name of the group field might be better

    • Get the value of a specific copybook item using the name of the copybook item

      Parameters

      • name: string

      Returns string | undefined

      value Returns the string representation of the copybook item's value, or undefined if it is not set

      Throws an error if a copybook item couldn't be found based on the provided name

    • Set the value of a copybook item based on the name of the item

      Parameters

      • name: string

        Name of the copybook item

      • value: string

        String representation of the value for the copybook item

      Returns void

      Throws an error if a copybook item couldn't be found based on the provided name