I am sorry to have to say, but 2 GB is actually 1 more than 2,147,483,647 - still, it is more than 16 MB - I believe a GB in this context is 1024 * 3, not 1000 * 3.

*Regards*

*Vern Hamberg*

IBM Champion 2025 <cid:part1.C34jlc7V.At5k71V7@centurylink.net> CAAC (COMMON Americas Advisory Council) IBM Influencer 2023


On 1/8/2026 1:51 PM, Daniel Gross wrote:
Hi Richard,

as David already pointed out - using a LOB locator should be the way to go.

A SQL LOB can be as large as 2147483647 bytes - that's more than 2GB

But ILE-RPG has a size limit for a single "chunk of memory" - read a data structure, a variable, an array - of about 16MB.

So you should be able to read your data e.g. with HTTP_GET (which returns a CLOB(2G) result) and store that in a global SQL variable (not an RPG variable) - then you can use a LOB locator, to read the data from the CLOB in "digestible" chucks (like 32k VARCHAR).

You can then put this data into dynamically allocated head storage (using %ALLOC() function) - there you shouldn't have a size problem.

Or if the data is JSON or XML - immediately parse it with JSON_TABLE or XMLTABLE and fetch the extracted tabular data.

HTH
Daniel

-snip

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.