Have you tried one of the IFS_WRITE Functions?
https://www.ibm.com/docs/en/i/7.5?topic=is-ifs-write-ifs-write-binary-ifs-write-utf8-procedures
Normally a LOB Locator can be used like any Character Field/Variable.
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: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of datil400
Sent: Wednesday, 26 March 2025 18:08
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Saving a CLOB from a locator
Hi guys,
I think this topic has already been discussed here, but I can't find the key words.
There is an SQL function “GET_CLOB_FROM_FILE()”, which returns a locator to the CLOB content in the IFS. Does the inverse function exist? For example “PUT_CLOB_TO_FILE(locator)”. Or does it not make sense?
I have found several third party SQL functions that do that same thing but from a CLOB data type:
https://gist.github.com/NielsLiisberg/d180d490a1e778a4a9530749498325ae
https://github.com/BirgittaHauser/Write-to-IFS-with-SQL/tree/master
Thanks for your comments,
--
Javier Mora
https://github.com/datil400
--
This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related questions.
As an Amazon Associate we earn from qualifying purchases.