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