Acu4GL: reading data from Oracle, the decimal separator is not respected

0 Likes

Problem:

A field is defined in Oracle as a numeric with decimals.
i.e.: 6,4

The corresponding field in COBOL is defined as PIC 9(6)v(4).

When Acu4GL reads the value in this field, the decimal separator is ignored.
i.e.: the value 1234,56 is read as 123456.

Resolution:

This is caused by the XFD files missing information about which decimal separator to use.

Version 6 XFD files now include information about decimal points,
while previous versions used to retreive the information from the COBOL object.
(And if different COBOL objects were compiled with different decimal options, the results would be unpredictable.)

If the decimal information is not available from the XFD, the interface uses defaults (period for period and comma for comma).

To avoid any conflict, regenerate the XFD files with the latest versions of the ACUCOBOL-GT compiler. 
(8.1.3.1, 9.2.5, 10.0.0)

The information about the decimal separator will be stored in the following records, depending on the style of the XFD file itself.

# [Identification Section]
XFD,06,FILE,FILE,12
...
000,18,044,046,00

Or

<xfd:period-character>,</xfd:period-character>
<xfd:comma-character>.</xfd:comma-character>

Claudio Contardi
Product Support Engineer, Senior
Micro Focus

Comment List
Anonymous
Related Discussions
Recommended