DataCellX12N Class (Extends DataCellN)

As noted above, this class is derived from the DataCellN class developed in Chapter 8. It uses base class methods for everything but the prepareOutput method, which handles the formatting requirements of the X12 Numeric data type.

Logic for the DataCellX12N prepareOutput Method
 Arguments: None Returns: Status or throws exception NegativeNumber <- false IF first character in Cell Buffer is "-" Cell Buffer <- Shift Cell Buffer left one character to remove Minus sign Negative Number <- true Decrement Buffer Length ENDIF Minimum Length <- Call Grammar Element's getAttribute for "MinLength", converting to integer IF (Buffer Length < Minimum Length) Call justifyFieldRight, passing Minimum Length and zero as Fill ...

Get Using XML with Legacy Business Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.