× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Where are your images stored? In a column of an SQL Table? From Where you
want to copy?

Assumed those pictures are listed within the column LWIIMAGE_F in the
LWIMAGES table, you can write those pictures into the IFS as follows:
1. your need to defined an File Referenece variable for output with the
keyword SQLTYPE(BLOB_FILE).
2. the precompiler will convert the File Reference Variable into a data
structure, containing the IFS file name, the length of the IFS File Name,
the data length and the file opteration.
3. you need to initialize those subfields
4. With a SELECT ... INTO or FETCH the information is written to the IFS

DCL-S MyImage SQLTYPE(BLOB_FILE);
DCL-s YourAUDFID ....;

EXEC SQL Declare C1 Cursor for
Select LWIIMAGE_F , audfid
from lwimages;

EXEC SQL Open C1;
MyImage_Name = '/home/Hauser/MyImageWhatever.jpc';
MyImage_NL = %Len(%Trim(MyImage_Name';
MyImage_FO = SQFOVR; //Constant included by the precompiler = write the
IFS file if not exists, otherwise replace an existing one

EXEC SQL Fetch Next from C1 into :MyImage, :Youraudfid;

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"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)


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jack
Tucky
Sent: Mittwoch, 22. Februar 2017 19:30
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Copy BLOB to IFS

I need to send a BLOB via FTP to another server. It's a JPG.

I'll have to do 5-10 images at a time so I think i'd like to copy the BLOB
to the IFS and then send all of the images in the IFS.

I've been googling, found some examples here but not sure where the image
will go.

I tried this code in SQL and am getting an error that the field LWIIMAGE_F
is not usable.

EXEC SQL Declare C1 Cursor for
Select LWIIMAGE_F ,
audfid
from lwimages;

EXEC SQL Open C1;
EXEC SQL Fetch Next from C1 into :LWIIMAGE_F,
audfid;
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link:
http://amzn.to/2dEadiD


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.