Ok here's my 2 coppers worth...

If you wish to get ONLY one record that matches the key that is what CHAIN
was designed for.  To access many records based on a key that's what SETxx &
READE(PE) is made for.  They are 2 different tools in our toolbox which
serve different purposes.

When used as designed they are wonderful...as stated before in this string
the scenario presented was a "short-cut" (IMO read bug...not a feature).  To
implement such a misuse of functionality tends to lend itself to great pains
at a later date.  Such as you see now.  If you have to "relearn" correct
handling of the opcodes then you have done a disservice to yourself as well
as others who may have to go maintain your code due to them not being aware
of the exploit you have been abusing.

Not trying to start WW3 just stating my opinion....

Thanks,
Tommy Holden


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Joe Pluta
Sent: Tuesday, March 29, 2005 12:31 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: Chain doesn't set %EOF


Okay, then the reason is that CHAIN is *not* a SETLL/READE.  It is a
CHAIN.  If a record is found, %FOUND goes on, if no record is found,
%FOUND goes off.  As others have mentioned, %EOF is also set off if the
CHAIN is successful.

Joe

> From: Paul Morgan
> 
> Actually, I'm trying to find out the reasoning behind the way it
works.
> To do that I'm explaining my reasoning for why it should work some
> other way. I don't expect it to fly.

-- 
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.