1. Samuel Sanchez Avila
  2. PowerBuilder
  3. Wednesday, 14 April 2021 18:39 PM UTC

Hello.

The issue of this question is the next situation. We have txt files of 20MB and above, where it contains a json in base 64. Inside this json we have status, description and PDF in base 64 and more...

Step 1: Loading file

           li_fnum = FileOpen(ls_path + "temp.txt", StreamMode!)
           li_bytes = FileReadEX(li_fnum, lb_data)
           FileClose(li_fnum)

 

Step 2: Decoding base 64 (issue). This function works fine with txt lower than 9MB, but for bigger, PB stop working.

                                                 Is there another alternative for reading the base64 that we need?

           string(lb_data, EncodingANSI!)

 

Step 3: Parsing Json


Thanks you for your time.

Baron Zhang @Appeon Accepted Answer Pending Moderation
  1. Thursday, 15 April 2021 08:52 AM UTC
  2. PowerBuilder
  3. # 1

Hi Samuel,

 

We tested with a file of 27MB and it was read successfully.

 

Please help answer the following questions:

  1. Is your operating system 32bit or 64bit?
  2. Please track the code to find out if the exception happens when it executes string(lb_data, EncodingANSI!).
  3. When there’s an exception in the application, please help check the memory usage of the system for us.
  4. If convenient, please provide your test case and the TXT file you used for our analysis. Thanks!

 

Regards,

Baron

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Wednesday, 14 April 2021 23:04 PM UTC
  2. PowerBuilder
  3. # 2

Samuel -

   It sounds like the only way to handle files of this size is to break them down into 9MB pieces and store those pieces.


Later -

Olan

Comment
  1. Miguel Leeuwe
  2. Wednesday, 14 April 2021 23:55 PM UTC
Great suggestion, you could / should use BlobMid() in a loop for that.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 14 April 2021 20:33 PM UTC
  2. PowerBuilder
  3. # 3

Hi Samuel;

  Have you tried compiling your PB App into a 64bit EXE and running the JSON parsing from that format that would support a higher address memory space?

Regards ... Chris

Comment
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.