Even under release V5R4 the rule that host variable names must be unique was
relaxed.
Under release V5R4 it is possible define a host variable with the same name
and the same definition in several procedures locally.
You'll only get a compile error when different definitions are used.
Real local variable support was introduced with release 6.1
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 Morgan, Paul
Gesendet: Friday, 21. October 2011 16:26
An: RPG programming on the IBM i / System i
Betreff: RE: SQLRPGLE cursor questions
Gary,
"The names of host variables must be unique within the program, even if the
host variables are in different procedures. However, if a data structure has
the QUALIFIED keyword, then the subfields of that data structure can have
the same name as a subfield in a different data structure or as a
stand-alone variable. The subfield of a data structure with the QUALIFIED
keyword must be referenced using the data structure name to qualify the
subfield name."
From page 97 of the System I Database DB2 Universal Database for iSeries
Embedded SQL programming V5R4 manual.
I believe D*B wants to use the same host variable name in different
procedures and have a SQL statement coded in each procedure use the
appropriate variable.
Paul Morgan
Principal Programmer Analyst
IT Supply Chain/Replenishment
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Gary Thompson
Sent: Friday, October 21, 2011 9:29 AM
To: RPG programming on the IBM i / System i
Subject: Re: SQLRPGLE cursor questions
D*B - thanks: good information
Darren wrote:
Better support for local host variables might
come first, before local cursor declaration.
I am curious; can you give an example of better support for local host
variables ?
As an Amazon Associate we earn from qualifying purchases.