True, unless the field from the PF is part of a data structure, then the
field being defined will be zoned.
Kind of confusing, isnt it
"Rajesh Choudhary" <RChoudhary@xxxxxxxx> 2008-03-31 10:54 >>>
Because, by default, if you do not specify the datatype, numeric
variables of the Data Structures are declared as zoned, in contrast to
the standalone numeric variables, which are by default packed.
Also, (Trap) if you use Like keyword, specifying a field that was
defined as zoned in PF, the field being defined gets declared as packed
in rpg.
Regards,
Rajesh Choudhary | Software Engineer,
Manhattan Associates
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Lim Hock-Chai
Sent: Monday, March 31, 2008 8:00 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: Rép. : Classic Traps -- I need your input!
Denis:
I'm not sure why making a variable become part of the data structure
would change its attribute from packed to zoned.
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Denis Robitaille
Sent: Monday, March 31, 2008 7:35 AM
To: RPG programming on the AS400 / iSeries
Subject: Rép. : Classic Traps -- I need your input!
<clip>
2. AN RPG programs works fine, you decide to make a variable that is
part of the parameters list part of a data structure. The variable was
defined as packed. After being added to the array, it is now zoned!!
Your programs start to bomb because it receives bad input. To avoid it,
what we did here is to avoied packed variable all together. The
performance impact, if any, is negligeible.
</clip>
As an Amazon Associate we earn from qualifying purchases.