Birgitta,
and you also have the 64K boundary on the ref.file
Med venlig hilsen/Kind regards
Henrik Rützou
HR Software Development
Ved Stampedammen 39
DK 2970 Hørsholm
Denmark
E-mail: hr@xxxxxxxxxxxx
Phone: +45 2714 8449
Homepage: powerEXT.com
"Birgitta Hauser" <Hauser@xxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
14-05-2010 17:05
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
To
"'RPG programming on the IBM i / System i'" <rpg400-l@xxxxxxxxxxxx>
cc
Subject
AW: Parameter prototype question
Hi David,
what do you think about using a field reference file and define all your
fields (parameter fields, work fields, file fields ... etc) with like
based
on this reference?
That's the way we work. When changing a reference field everything must be
recompiled but we do not care about anything else.
The field reference file is included as external based data structure (we
are not yet on release 6.1 so we cannot use the keyword TEMPLATE), in
every
RPG source member we use. All Fields are refeneced:
Example
D/If not defined (FldRef)
D/Define FldRef
D FldRef E DS ExtName('MYFLDREF')
qualified
D Based(DummyPtr)
D/EndIf
D MyProc PR
D ParAAA Like(FldRef.AAA) Const
D POutCCC Like(FldRef.CCC)
D ParBBB Like(FldRef.BBB) Const
D Options(*NoPass)
D MyVarAAA S Like(FldRef.AAA)
D MyDS DS Qualified
D XXX Like(FldRef.XXX)
D YYY Like(FldRef.YYY)
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 David FOXWELL
Gesendet: Friday, 14. May 2010 16:31
An: RPG programming on the IBM i / System i
Betreff: RE: Parameter prototype question
-----Message d'origine-----
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Simon Coulter
Pah! The compiler can't protect you from stupidity. The
problem was caused entirely by you trying to stuff 9 pounds
in a 7 pound bag and not expecting it to overflow i.e., not
paying attention to what you were doing. Sure, without CONST
or VALUE the compiler would have caught the mismatch but
consider the reverse situation where you might want to pass a
smaller value or a different data type or a literal;
I don't need to consider the reverse situation here. Its just a simple
case
as with most of our procedure calls of wanting to pass a variable from one
procedure to another and wanting the compiler to check that for me. If
you're saying that I should have checke the attributs of each of the 20 or
so parameters myself then what's the point of having a compiler that is
capable of checking?
As an Amazon Associate we earn from qualifying purchases.