1. Antony Xavier
  2. PowerServer 2020 or older (Obsolete)
  3. Saturday, 21 December 2019 09:03 AM UTC

Hi Gurus,

Am facing decimal precision problem, we are using 18 digit precision for key columns (zero scale) , and in AEM, modified from 15 to 28 digit in PB features ("Welcome > Application > PB Features > Decimal Precision" ) but no hope, I restarted the IIS & PC, redeployed  after changing, but no hope. how I can solve this issue, any workaround?.

Regards

Antony

 

Accepted Answer
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Saturday, 21 December 2019 17:08 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # Permalink

The decimal precision setting in AEM only applies to DataWindow.  If you are doing DataWindow expression, the decimal precision only applies to Abs, Avg, CamulativeSum, Median, Sign, and Sum.

I think you should move this calculation into a C# Web API and call it with the new RESTClient.  Your subscription of PowerBuilder includes an easy-to-use C# IDE and .NET DataStore so that coding in C# is very similar to PowerBuider.

 

Comment
  1. Armeen Mazda @Appeon
  2. Sunday, 22 December 2019 04:07 AM UTC
If C# really cannot support more than 28 digits then this is not going to be a priority for us to resolve. You really think this is wise use of our engineering resources when C# used by millions of developers doesn't support this?



Anyway, Antony's problem was he needs 18-digit precision and he may not even be using Oracle. I believe I have given him a quality response by pointing out PowerServer's limitations and suggesting a possible workaround that would solve his particular problem. There's not much more we can do for his issue in this Q&A.
  1. Helpful
  1. Antony Xavier
  2. Sunday, 22 December 2019 08:48 AM UTC
Hi Armeen,

Thank you very much for your suggestion and quick response, I had changed datatype from decimal to varchar.



Thank you very much Mr. Chris.

Regards

Antony
  1. Helpful
  1. Chris Pollach @Appeon
  2. Sunday, 22 December 2019 17:57 PM UTC
Hi Anthony ... You are most welcome. I think that for super large decimal fields, capturing & displaying this datum in character format is the best. However, when doing calculations where precision accuracy past 28 digits is required, the better processing platform for this would be within the DBMS itself.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Saturday, 21 December 2019 21:03 PM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 1

Hi Anthony;

   Yes, I have seen in recent DBMS versions that decimal columns can have upwards of 38 decimal places! This number is higher than PowerBuilder or PowerServer can handle. So one step to address this issue for future use could be to open a Support Ticket enhancement request to have PB & PS to handle higher decimal place precision.

  My suggestion and maybe the easiest way around the problem, might be to tap the DBMS itself. My thoughts here would be to use either a Stored Procedure or Stored Function to do the precise decimal calculation(s). Then return the rounded numeric data as either a decimal data type or if too large, just String data for App display. IMHO, I think that the SF / SP route would be much easier to implement.

Food for thought.

Regards ... Chris

Comment
  1. Armeen Mazda @Appeon
  2. Saturday, 21 December 2019 23:38 PM UTC
There is no point to open such enhancement request. PowerServer translates PowerScript to JavaScript to run in the Web browser. JavaScript has limitation on decimal precision. Hence my suggestion to do the calculation in C# instead of PowerScript for such PowerServer Web apps.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.