Optionaloccurs: numberOptionalredefines: ICopybookItemOptionalchildren: ICopybookItem[]Optionalvalue: anyOptionaldecimals: numberOptionalchildrenList of copybook items containing all children under the current copybook item
Object representing the offset of this copybook item in a transaction and the byteLength of this copybook item determined by the picture, length and usageType
OptionaldecimalsAmount of decimals used, related to PIC clauses defining decimals. Currently not in use, optional
Total length of the copybook item
Level at which this ICopybookItem resides
Name of the copybook item
OptionaloccursAmount of times this copybook item occurs, optional
Picture clause of the copybook item
OptionalredefinesReference to copybook item which the current copybook item redefines, optional
Indicator if the copybook item is signed
Usage of the current copybook item, e.g DISPLAY or COMP-3
OptionalvalueValue for the current copybook item. Currently not in use, optional
ExperimentalFormat the DataItem value as a COBOL-style fixed-width string using formatter helpers.
string String representation of the value for the current instance
Set the value for this DataItem taking picture, length and usage into account.
string the value is converted to string, truncated or padded with spaces to lengthnumber and packed the value is converted to a number and validated against length (total digits). Throws when value is not numeric or exceeds the defined length
usage is display, the value is stored as a string padded with leading zeros to match the defined length.usage is comp (or any other non-display usage), the value is stored as a numeric string without padding (() will handle the conversion to the appropriate binary format based on usage)Value to set
{void}
Convert the current value to a buffer.
If the value is not set, an empty value will be returned according tot the picture and length
{Buffer} Buffer representation of the current value
The DataItem class represents a single line in a COBOL copybook as an object.
Data of the line such as the used level, the name of the element, picture clause etc. are parsen into properties of the DataItem