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



Try using DSPECs  PR & PI

Michael Schutte
Work 614-492-7419
email  michael_schutte@xxxxxxxxxxxx


                                                                           
             "Mike Cunningham"                                             
             <MCUNNING@xxxxxxx                                             
             >                                                          To 
             Sent by:                  <rpg400-l@xxxxxxxxxxxx>             
             rpg400-l-bounces@                                          cc 
             midrange.com                                                  
                                                                   Subject 
                                       RPG Stored Procedure returning a    
             04/06/2006 09:51          BLOB                                
             AM                                                            
                                                                           
                                                                           
             Please respond to                                             
              RPG programming                                              
              on the AS400 /                                               
                  iSeries                                                  
             <rpg400-l@midrang                                             
                  e.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))
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




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.