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



Ladies and Gentlemen, :)

I have been struggling with an embedded SQLRPGLE compile message.

SQL5011  30 22  Position 37 Host structure array FBH not defined or  not usable. Reason: The host variable is not defined or is not a valid structure. A valid host structure must have at least one valid member.

This is the FETCH statement:

*exec sql Fetch next from CK for :Rows_to_fetch rows into :FBH  ;*

This is the structure I'm reading into:

*       dcl-ds  FBH qualified  dim(1000)  ;
         ot    packed(3:0);
         pro   packed(7:0);
         Tnum  packed(5:0);
         bba   packed(1:0) ;
         aba   packed(1:0) ;
         bscd  char(7);
         ascd  char(7);
         bymd  Zoned(8:0);
         aymd  Zoned(8:0);
         btime Zoned(6:0);
         atime Zoned(6:0);
       END-DS;
*

I even took out the DIM and listed out each field for the INTO:  Into :OT, :PRO, :TNUM, etc. When I did that it gave me an error that ==> _Variable OT not defined or not usable. No declaration exists, is not within the scope, or the variable does not have an equivalent SQL type._ (I tried all packed, too). AND I tried doing the FETCH one row at a time (without the for :X rows) and got the not-defined error.

Can I get a witness??




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.