× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Try it. You'll see. In fact, it can get even more confusing.

Here is more details.

You have an externally define file
Fmyfile if e k disk

It has a variable called : pakednbr 5p 0

you compile the program and look at the compile listing, you will see
pakednbr define as 5p 0

Now add the following lines to the program
D datastr ds
D pakednbr

recompile the program. Look at the compile listing and voila, the
internal definition of pakednbr has gone from packed to zoned. This
causes no problem except if you use the variable has a parameter
somewhere.

to make thing even worst, you get the same situation if pakednbr was
define zoned in the DDS of the file. (packed inside the program except
if part of a data structure)

I can not be sure why it is so, but it is so and it burned me in the
past.

"Lim Hock-Chai" <Lim.Hock-Chai@xxxxxxxxxxxxxxx> 2008-03-31 10:29

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.

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.