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



By "Trimming"

Do you mean that you specified 1 as the second parameter on the
GET_BLOB_FROM_FILE function?
Or that you wrapped the whole function call in a trim?

I'd be interested to understand exactly what is failing if you don't trim
it.

Is the issue that the field on your target file for insert is too small?

I'd be tempted to the BLOB into an SQLType in the program and look at it's
length in the debugger.

On 7 February 2018 at 19:21, Jason <jason.p1978@xxxxxxxxx> wrote:

This has been resolved by trimming the myfile parameter.

On Wed, Feb 7, 2018 at 10:02 AM, Jason <jason.p1978@xxxxxxxxx> wrote:

The goal is to insert a blob into a DDL table. If the insert statement
(see below) is ran via IBM i Access Client Solutions, the record is
written. Attempting the same insert statement via embedded SQL or as a
Stored Procedure called via IBM i Access Client Solutions results in an
error (see below). Has anybody ran into a situation like this? Are there
any ideas of how to resolve it?

*Example:*



insert into mylib.mytable

values(mycharvalue, mydecimalvalue,

get_blob_from_file(myfile,0),

0, ' ', ' ', NULL, current_timestamp, myuser);



*Error:*

Message ID . . . . . . : CPF503E Severity . . . . . . . : 30
Message type . . . . . : Sender copy
Date sent . . . . . . : 01/24/18 Time sent . . . . . . :
09:48:35

Message . . . . : User-defined function error on member QSQPTABL.
Cause . . . . . : An error occurred while invoking user-defined
function
GET_BLOB_FROM_FILE in library QSYS2. The error occurred while invoking
the
associated external program or service program QDBSSUDF2 in library
QSYS,
program entry point or external name QSQGTBF, specific name
GET_BLOB_FROM_FILE_2. The error occurred on member QSQPTABL file
QSQPTABL in
library QSYS2. The error code is 1. The error codes and their meanings
follow:
1 -- The external program or service program returned SQLSTATE 42704.
The
text message returned from the program is: *N in *N type *File not
found..

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-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 ...

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.