CA Gen Summarize (SUM) result has decimal point in wrong position - .NET Server with "Oracle.DataAccess.Client"
search cancel

CA Gen Summarize (SUM) result has decimal point in wrong position - .NET Server with "Oracle.DataAccess.Client"

book

Article ID: 215174

calendar_today

Updated On:

Products

Gen Gen - Run Time Distributed

Issue/Introduction

CA Gen 8.6 .NET Server using Data Provider "Oracle.DataAccess.Client". An attribute defined as NUMBER(15,2) has the decimal point in the wrong position after a Summarize (SUM) statement. READ or READ EACH statement do not show the problem.

The example server PStep populates 2 rows into the database for table account_movement and then runs summarize statement for its column trx_amount i.e.
1. The table account_movement contains these 2 rows for column trx_amount:
+++
SQL> select trx_amount from account_movement where account_number=78935;

TRX_AMOUNT
----------
     150.3
     200.6
+++

2. The SUMMARIZE statement is coded as follows:
+++
  134 |  SUMMARIZE account_movement 
  135 |        PLACING sum(account_movement trx_amount) INTO out ief_supplied num_15_2
  136 |        WHERE DESIRED account_movement account_number IS EQUAL TO 78935 
+++

So the sum of the 2 values 150.3 and 200.6 should be 350.90.
However, the value 3509.00 is returned to the ASP.NET Client. 

Tracing the server with the DTU (Diagram Trace Utility) also shows 3509 being returned from the server PStep.

Environment

Release : 8.6

Component : CA Gen Run Time, ASP.NET

Resolution

Support was able to recreate the problem with provided model on a Windows server where the "Decimal symbol" and "Digit grouping symbol" had been changed from the defaults . and , respectfully i.e.
Under "Control Panel/Region/Formats/Additional settings" those values had been swapped as follows:
Decimal symbol: ,
Digit grouping symbol: .

The customer confirmed that the same values were set in their environment NOTE: In the Gen model, the Default Dialect was still being used with Decimal Separator still set to the default . which is shown in the client value displayed.

After further research Support found that adding String Value NLS_NUMERIC_CHARACTERS to the registry key for the ORACLE Home being used by the "Oracle.DataAccess.Client" and setting its Value Data to match the region settings ,. resolved the problem i.e 

1a. Run regedit.exe and go to the ORACLE Home key for the Oracle client software being used.
b. Add new String Value name NLS_NUMERIC_CHARACTERS and set its Value Data to ,.
For example:

c. Close regedit.exe

2. Under "Control Panel > Administrator Tools > Component Services" go to the COM+ application and use the right mouse button. First select "Shut down" and then select "Start" i.e.




3. Retest the client application and the correct value is displayed: