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


Am 08.01.2026 um 18:31 schrieb Richard Schoen <richard@xxxxxxxxxxxxxxxxx>:

Hi All,

The SQLRPGLE compiler chokes on a blob field larger than 16mb. It won't compile.

Is there an option in SQLRPGLE to download files larger than 16mb ?

I have lots of non-RPG alternatives, but this customer is using RPG so trying to keep extras out of the mix.

I seem to recall using teraspace, but when I added: ctl-opt ALLOC(*TERASPACE); that didn't help.

Anyone ?

Regards,
Richard Schoen
Web: http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx<mailto:richard@xxxxxxxxxxxxxxxxx>

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.


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.