1. Rohith Karanavor
  2. PowerBuilder
  3. Monday, 22 August 2022 17:17 PM UTC

Hi,

We have done a migration of our code from Power Builder 10 (32 bit) to Appeon Power Builder 21 Pro (32 bit).

Our backend application throws error ids for business errors. We were using PSR for displaying the corresponding error description in PB UI.

Error id to Error description was stored as PSR Reports. When we did PB10 to PB21 migration, we discontinued the use of Infomaker (PSR).

Instead of that, we started using a text file, where we stored error id to error description mapping.

To get this mapping in PB code, we started using a dw.ImportFIle function in PB21 code.

We started getting a strange error when we started using dw.ImportFIle function. Any error id stored in the text file, which is greater than 4294967295 throws " <error id> Item doesn't pass the validation test".

//Below code throws Item validation error when I have an error id which is greater than 4294967295

//Entries in the text file is like below. Error id 75056364 is read properly. But all other error ids fail with item validation error.

75056364 Customer response start date is less than Ex date.
6703900010 Default SWIFT Version must be specified.
6703900011 Default SIC version must be specified.
6703900012 Default SECOM version must be specified.
6703900013 Maximum Group Wait Time must be specified.
6703900014 Site number must be specified.

//Error Screenshot

Does it mean that ImportFile doesn't support / read integers greater than 4294967295?

 

 

Rohith Karanavor Accepted Answer Pending Moderation
  1. Wednesday, 24 August 2022 12:46 PM UTC
  2. PowerBuilder
  3. # 1

Changed data-window column type to decimal. That solution worked.

 

Thanks Chris

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 24 August 2022 15:25 PM UTC
Hi Rohith .. that is awesome news - thanks for the feedback! :-)
  1. Helpful
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Monday, 22 August 2022 22:23 PM UTC
  2. PowerBuilder
  3. # 2

My recommendation for large non-decimal numeric data is to use longlong, but if your data is really large then Chris's advice to use decimal is the way to go.

Comment
  1. Rohith Karanavor
  2. Tuesday, 23 August 2022 07:13 AM UTC
Hi Olan,



Thanks a lot for the suggestion.



But I guess data-window column type specification doesn't have longlong. It has String, Number, Decimal, Date, Datetime, Time, Long, ulong

I guess I need to use decimal. Infact my backend linux system uses long long



Kindly clarify

Thanks

Rohith





  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 22 August 2022 18:32 PM UTC
  2. PowerBuilder
  3. # 3

Hi Rohith;

   For very large numbers, make sure the the DWO's associated column is of type Decimal. That data type can handle up to 28 digits (ie: Dec(28,0) ). 

https://docs.appeon.com/pb2021/datawindow_reference/XREF_36021_Alphabetical_list.html#XREF_32184_ColType

HTH

Regards ... Chris 

Comment
  1. Rohith Karanavor
  2. Tuesday, 23 August 2022 07:14 AM UTC
Hi Chris,

Let me try this and get back.



Thanks

Rohith
  1. Helpful
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Monday, 22 August 2022 17:52 PM UTC
  2. PowerBuilder
  3. # 4
Comment
  1. Rohith Karanavor
  2. Tuesday, 23 August 2022 07:15 AM UTC
Thanks Mike,

Let me try decimal and see if it works



Regards

Rohith
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Monday, 22 August 2022 17:26 PM UTC
  2. PowerBuilder
  3. # 5

What is the datatype of the column object that is used for the error code in the DataWindow data object?

Comment
  1. Rohith Karanavor
  2. Tuesday, 23 August 2022 07:09 AM UTC
Hi John,

We are using int. I will change it to decimal and retry.



Thanks

Rohith
  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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.