Thanks Mark. I was going to say that I tried it, and it didn't work, but it did this time. So, the following worked for me.
create table darren/btest
(f1 blob)
insert into darren/btest
(select * from table(values GET_BLOB_FROM_FILE('/tmp/test.pdf',1))
)
Commit
call qsys2.ifs_write_binary
(PATH_NAME=>'/tmp/testout.pdf',
LINE=>(select * from darren/btest),
OVERWRITE=>'NONE'
)
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Mark Waterbury
Sent: Monday, September 25, 2023 12:49 PM
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.
Try using IFS_WRITE_BINARY ...
On Monday, September 25, 2023 at 12:42:23 PM EDT, Darren Strong <darren@xxxxxxxxx> wrote:
Yeah, after I sent my original solution with CLOB, I figured the same should work for BLOB if it works with CLOB. Not so. IFS_WRITE does not like or want a BLOB type input.
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Rob Berendt
Sent: Friday, September 22, 2023 12:27 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: IFS to BLOB and BLOB to IFS without RPG?
Is there a put_blob_to_file?
--
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.