If you want to write the information into the IFS, there is no need to save
it first in a LOB Variable or LOB Locator.
It can be directly written into a LOB-File:
Here is an example of writing a source physical file member into the IFS:
DCL-S MyBLOBData SQLType (BLOB_File);
DCL-S ParToIFSFile VarChar(256) Inz('/home/Hauser/SavSource.txt');
DCL-S ParFromMbr VarChar(256) Inz('HSRRRPG/QEMBSRC(EMBLOBFIL2)');
//**************************************************************************
*******************
Exec SQL Set Option Commit=*CHG, DatFmt=*ISO, TimFmt=*ISO,
Naming=*SYS, CloSQLCsr=*EndActGrp;
//Copy Source File Into IFS
MyBLOBData_Name = %Trim(ParToIFSFile);
MyBLOBData_NL = %Len(MyBlobData_Name);
MyBLOBData_FO = SQFOVR; //Replace if
exists
Exec SQL Set :MyBlobData = Get_Blob_From_File(:ParFromMbr);
If SQLCODE < *Zeros;
//Error handling
EndIf;
Exec SQL commit;
*InLR = *On;
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
Modernization ? Education ? Consulting on IBM i
Database and Software Architect
IBM Champion since 2020
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
"Train people well enough so they can leave, treat them well enough so they
don't want to. " (Richard Branson)
"Learning is experience ? everything else is only information!" (Albert
Einstein)
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
Richard Schoen
Sent: Monday, 12 January 2026 19:22
To: midrange-l@xxxxxxxxxxxxxxxxxx
Subject: Re: Using QSYS2.HTTP_GET_BLOB to download file larger than 16mb
with SQL
In my scenario I was writing to the IFS.
Would love to a write it to DB example.
Regards,
Richard Schoen
Web:
http://www.richardschoen.net
Email: richard@xxxxxxxxxxxxxxxxx
----------------------------------------------------------------------
message: 1
date: Mon, 12 Jan 2026 16:49:22 +0000 (UTC)
from: cesco via MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx>
subject: Re: Using QSYS2.HTTP_GET_BLOB to download file larger than
16mb with SQL
What are you trying to do with the blob thing?Let it live in its own "blob
bubble", ie store it in db or in ifs if you than need some post processing.
bye
On Friday, January 9, 2026 at 04:33:43 PM GMT+1, Vern Hamberg via
MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx> wrote:
LOL - The "rest"of the world is not all computer professionals. IBM uses
the 1024 in its evaluation of kilobytes and megabytes and all - thus, I
believe we do know better then to follow the "rest". Especially if making a
statement of comparative size.
*Regards*
*Vern Hamberg*
IBM Champion 2025 <cid:part1.6YCgsbFX.0FTYId1b@centurylink.net> CAAC (COMMON
Americas Advisory Council) IBM Influencer 2023
--
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.