For the record:
Blob locator for the win:
dcl-s zipBlob SQLTYPE(BLOB_LOCATOR);
Instead of:
dcl-s zipBlob SQLTYPE(BLOB: 16000000); (Which maxes out at 16mg)
You also have to specify COMMIT=*CHG or it won't work.
exec sql
SET OPTION COMMIT = *CHG,
NAMING = *SYS,
CLOSQLCSR = *ENDMOD;
Regards,
Richard Schoen
Web:
http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx
---------------------------------------------------------------------
message: 1
date: Thu, 8 Jan 2026 17:31:14 +0000
from: Richard Schoen <richard@xxxxxxxxxxxxxxxxx>
subject: Using QSYS2.HTTP_GET_BLOB to download file larger than 16mb
with SQL
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>
As an Amazon Associate we earn from qualifying purchases.