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



Hi All,

Our shop is just now jumping into procedures and service programs. One of the things I thought would be a great help are localized variables in procedures. Now I am seeing that localized variables do not seem to work if the program or modules uses SQL? For example, a few of the procedures in one of our service programs use the variable I as the counter in FOR loops. This throws the SQL0314 error.

I did some research and it looks like this was broken in V5R3. Is it really still unresolved? Or am I missing some special workaround we are all supposed to be using? I did read that you can use qualified data structures to avoid some of this, but clearly I would not want every work variable to be declared in a data structure. And you cannot use qualified data structure fields in SQL either.

Please let me know how you are all dealing with this. Not really supporting local variables seems like a huge problem to me.

Thanks!
JD

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.