|
>The problem with these approaches is that the file is external, so I think
>they wont work (I believe EXTFILE can't be used with externally described
>files, or so I read in the spec)
ExtFile will work with externally described files, as long as they have the
same layout.
Here is just a simple solution for your problem
Select;
when Condition = 1;
Chain(e) Key1 FileF1;
when Condition = 2;
Chain(e) Key2 FileF2;
....
EndSL;
If %Found;
DoW 1=0;
exsr ForEachRecord;
Select;
when Condition = 1;
reade(e) Key1 FileF1;
when Condition = 2;
reade(e) Key2 FileF2;
....
EndSL;
If %EOF;
leave;
EndIf;
enddo;
EndIf;
Birgitta
--
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 mailing list archive is Copyright 1997-2025 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.