|
We actually got this to do what we wanted by changing the BLOB to a CLOB. The CLOB parameter was accessable by the JSP code. >>> liisberg@xxxxxxxxxxxxx 4/19/2006 7:26:06 PM >>> Hi Mike; The problem is that MyBlob mow becomes a based variable because all PARM variables are actually based - So now SQL can't find the allocated storage for MyBlob. You can however help this out by parsing a pointer in the *ENTRY MyBlobPtr and the base a your "MyBlob" with a size on that ... Regards Niels; ----- Original Message ----- From: "Mike Cunningham" <MCUNNING@xxxxxxx> To: "Web Enabling the AS400 / iSeries" <web400@xxxxxxxxxxxx> Sent: Thursday, April 06, 2006 3:19 PM Subject: [WEB400] RPG Stored Procedure returning a BLOB >I want to return a BLOB field from an RPG program that is being used as > a stored procedure. I can create the BLOB field and get the data in it > that I want but when I add the BLOB field to the *ENTRY parameter list > to pass it back I get a compiler error that the BLOB field can be > initialized. > > I defined a large string and a BLOB like this > > MyString S 20000 > MyBlob S SQLTYPE(BLOB:20000) > > I put the data I want to return in MyString and then use this SQL > command to put in the BLOB field > > C/EXEC SQL > C+ SET :MYBLOB = BLOB(:MYSTRING) > C/END-EXEC > > Doing this compiles OK and I can run the app and see the data in both > MyString and MyBlob in debug. > > When I add this line of code I get the compiler error > C *ENTRY PLIST > C PARM MyBlob > > *RNF7306 20 1 The initial value for a pointer field is not valid. > The initial value for pointer field SQL_00006 is not valid. > > DS > SQL_00000 1 2B 0 INZ(128) > SQL_00001 3 4B 0 INZ(1) > SQL_00002 5 8B 0 INZ(0) > SQL_00003 9 9A INZ('0') > SQL_00004 10 128A > SQL_00005 129 20128A > SQL_00006 * INZ(%ADDR(MYBLOB)) > -- > This is the Web Enabling the AS400 / iSeries (WEB400) mailing list > To post a message email: WEB400@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/web400 > or email: WEB400-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/web400. >
As an Amazon Associate we earn from qualifying purchases.
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.