×
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.
Yep, reference fields must be defined globally.
But data structures and anything else can be defined locally even with
different definitions (data types and length)
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im
Auftrag von Schmidt, Mihael
Gesendet: Thursday, 20. August 2009 09:37
An: RPG programming on the IBM i / System i
Betreff: Odd ... sql wants a host variable to be defined global
Hi,
I got a sql rpg module with some procedures and got no problem so far till
now.
I want to fill a data structure which is defined local in the procedure with
an embedded sql statement. But the compiler complaines that it cannot find
the data structure.
RNF7451: Integrierte Funktion %ADDR(EIGENSCHAFT... ist nicht definiert
D SQL_00165 S LIKE(EIGENSCHAFTENNEU
)
D BASED(SQL_00166
)
D SQL_00166 S * INZ(%ADDR(EIGENSCHAFTENNEU
))
(FYI: EIGENSCHAFTENNEU ist my local defined data structure)
If I make the data structure global everything is ok.
All in all I can understand the compiler. He searches in the global D-Specs
for a reference which is defined local in a procedure. That won't work. But
why is that so? My understanding so far was that host variable and host data
structures does not have to be defined global anymore. It seems that I was
wrong!?
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.