Handling of Numeric-Edited and External Floating-Point Items
Numeric-edited and external floating-point items in COBOL are numeric items that are represented as formatted text, which is formed according to the PICTURE clause editing rules. You can select the processing type to apply in a Copybook resource’s Field Configuration page.
Rules
In the XSD Type column of the Field Configuration page, each numeric-edited item contains the value string and a numeric type appropriate for the item’s PICTURE clause. Note these rules:
- If you select string, the Plug-in processes the item as a string and does not validate its content. The Trim Whitespaces from String Values setting of the Parse Copybook Data activity and the Filler Character setting of the Render Copybook Data activity are in effect.
- If you select a numeric XSD type,
PICTURE clause editing and deediting are in effect. The Plug-in converts the string’s text content to a number during parsing and a number to text during rendering according to the
PICTURE clause’s editing rules.
If the text content of the item does not conform to the PICTURE clause, the Parse Copybook Data activity fails.
- The Character Set settings are always in effect.
- The XSD type string is selected by default for numeric-edited items. double is selected by default for external floating-point items.
Validation
If you select a numeric XSD type, the Plug-in validates the field’s text content during parsing. Any deviations from the format in the PICTURE clause lead to activity failures.
For example, the value 123 45, for an item with PICTURE 999.99 fails because of the missing decimal point in position number 4.
The Plug-in also validates the VALUE clause against PICTURE. In case of a mismatch, the Plug-in discards the VALUE clause.