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



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

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.