Found some methods that can do it:

-- Put IFS file into CLOB (requires commitment control)
create table darren/ctest
(f1 clob);

insert into darren/ctest
(select * from
table(values GET_CLOB_FROM_FILE('/tmp/test.csv',1))
);

Commit;


--Extract IFS from CLOB
call qsys2.ifs_write
(PATH_NAME=>'/tmp/testout.csv',
LINE=>(select * from darren/ctest),
FILE_CCSID=>'1252',
OVERWRITE=>'NONE'
);


-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Rob Berendt
Sent: Friday, September 22, 2023 9:27 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: IFS to BLOB and BLOB to IFS without RPG?

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


There is an sql type called a datalink. This is basically a reference to an IFS file. I tried a little research into it but there does not seem to be any examples of even simply using a datalink column let alone converting from a datalink to a blob.
https://www.ibm.com/docs/en/i/7.5?topic=datalinks-working

On Wed, Sep 20, 2023 at 2:05 PM Darren Strong <darren@xxxxxxxxx> wrote:

Is there a method yet to import and export IFS files from LOB type
columns in an SQL table, just using SQL? I've seen methods to
transfer both ways using RPG and embedded SQL. I'd hoped that maybe
something like this was possible with the newish IFS_WRITE_BINARY()
procedure, but, the "line" data doesn't mention that it would accept a LOB type value.



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


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