Hi,

You could always use host variables locally.

But before release V5R3 uniqueness was not checked.
With release V5R3 host variables could only be defined once in the source
member, independent if they were defined locally or globally.

With release V5R4 the same host variable with the same definition can be
defined and used in several procedures.
If the local host variables has the same type but different length, you'll
get a warning, but nevertheless the program will be compiled. There will be
only a problem if the same local variable is defined in several procedures
differently.

With release V6R1 (at least what I've heard), host variables get really
local, i.d. the precompiler checks it they are defined locally. Even
different definitions in several procedures will be no problem.

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 Joe D
Gesendet: Friday, February 15, 2008 16:58
An: RPG programming on the AS400 / iSeries
Betreff: Re: Encapsulation - Service Programs, Procedures, SQL, LDA, etc.


----- Original Message -----
From: "BirgittaHauser" <Hauser@xxxxxxxxxxxxxxx>
To: "'RPG programming on the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx>
Sent: Thursday, February 14, 2008 9:59 PM
Subject: AW: Encapsulation - Service Programs, Procedures, SQL, LDA,
etc.

Files defined locally are only valid for the procedure's scope.

Any chance a similar change will be coming for the SQL precompiler? It
would be REALLY great if SQL Host Variables were local to the procedure(s)
they are used in...


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.