Contrary to SQL native IO always uses the predefined access path, i.e. the
access path located within the DDS described files or SQL Indexes that are
specified within the F-Specs.
No additional optimization occurs.
In this way reading with a partial key, will read the records according the
key definition (i.e. in your case ascending date).
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 Jeff Crosby
Gesendet: Wednesday, 19.6 2013 20:54
An: RPG programming on the IBM i / System i
Betreff: READE with partial key
Suppose I have a file defined via DDL with unique key consisting of
Item (ascending)
Date (ascending)
// Set position in file
SETLL Item FILE;
// Only while this item
Dow '1';
Reade Item FILE;
If %EOF(FILE);
Leave;
Endif;
process record . . .
Enddo;
I am not assured of getting records within this item in ascending Date
sequence, am I? Some testing I'm doing now shows that I don't.
--
Jeff Crosby
VP Information Systems
UniPro FoodService/Dilgard
P.O. Box 13369
Ft. Wayne, IN 46868-3369
260-422-7531
www.dilgardfoods.com
The opinions expressed are my own and not necessarily the opinion of my
company. Unless I say so.
--
This is the RPG programming on the IBM i (AS/400 and 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.