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



Yes. But why does it make a reference to it in the first place. It didn't do it in other places.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Birgitta Hauser
Sent: Thursday, August 20, 2009 10:00 AM
To: 'RPG programming on the IBM i / System i'
Subject: AW: Odd ... sql wants a host variable to be defined global

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!?

Any ideas?

We are on 6.1 .

Thanx in advance

Mihael Schmidt
Anwendungsentwicklung

Dirk Rossmann GmbH
Iserhägener Str.16
30938 Burgwedel
* +49 (05139) 898 - 4353

Handelsregister-Nr. HRB 120546, Amtsgericht Hannover
Ust-Id-Nr. DE 115055186
St.-Nr. 16 / 205 / 65401
Geschäftsführer: Dirk Roßmann, Alice Schardt-Roßmann, Roland Frobel, Klaus
Praus


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.