You might get better response in the RPG list. This list is more for RDi
discussions.
I will say that atrval20 is probably defined as a global static variable in
your program. It is then passed by reference using a pointer to
WriteAttribute. Then you are resetting the global variable, which
subprocedures have access to. I would say that this has always been
possible, although CONST doesn't always pass the variable as a reference,
so the behavior might seem sporadic.
From: "Colpaert, Peter" <Peter.Colpaert@xxxxxxxxxxx>
To: Rational Developer for IBM i / Websphere Development Studio
Client for System i & iSeries <wdsci-l@xxxxxxxxxxxx>
Date: 02/20/2014 08:14 AM
Subject: [WDSCI-L] CONST parameter changed?
Sent by: wdsci-l-bounces@xxxxxxxxxxxx
Hi group,
I encountered a strange issue today when coding a procedure.
In my main procedure, I call a subprocedure:
WriteAttribute(o_pdmnbr19:
o_vernbr19:
*blanks:
atride94:
atrval20);
In my WriteAttribute procedure, I have the following interface:
Dcl-proc WriteAttribute;
Dcl-pi *n;
pdmnbr_p like(pdmnbr20) const;
vernbr_p like(vernbr20) const;
colint_p like(colint53) const;
atride_p like(atride20) const;
atrval_p like(atrval20) const;
End-Pi;
At one point in the subprocedure, I do a reset of the record format
containing - among other fields - ATRVAL20.
As soon as I do this Reset, the atrval_p field goes blank also.
Is this normal behaviour or am I doing something wrong?
I thought that the CONST keyword indicated that your parameter could not be
changed...
Met vriendelijke groeten / Best regards,
Peter Colpaert
Software Engineer - PLM Development Team
IT Operations Cluster Benelux, Philips IT
Philips Consumer Luminaires
Industrieterrein Satenrozen 11, 2550 Kontich, Belgium
Tel: (+32) 3/459 13 17
Email: Peter.Colpaert@xxxxxxxxxxx<mailto:Peter.Colpaert@xxxxxxxxxxx>
Working from home on Wednesdays
________________________________
The information contained in this message may be confidential and legally
protected under applicable law. The message is intended solely for the
addressee(s). If you are not the intended recipient, you are hereby
notified that any use, forwarding, dissemination, or reproduction of this
message is strictly prohibited and may be unlawful. If you are not the
intended recipient, please contact the sender by return e-mail and destroy
all copies of the original message.
--
This is the Rational Developer for IBM i / Websphere Development Studio
Client for System i & iSeries (WDSCI-L) mailing list
To post a message email: WDSCI-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/wdsci-l.
As an Amazon Associate we earn from qualifying purchases.