× 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.



>Dow Not %EOF(primary)
>     Read primary;
>     Read secondary;
>     // Calc specs
>EndDo;

Not quite. This is the bit the cycle does for you:

Dou %EOF(primary file) and %EOF(all secundary files)
        Read primary file
        Read all secondary files
        Move data of appropriate file into program fields
EndDo

Note that there can be only one primary file, but any number of secondary 
files.
The appropriate file:
- If no match fields are specified, you get all the records of the primary 
file, then all the records of the first secondary file, then the second, 
and so on.
- If match fields are specified, you get the records in the order of the 
match field.

And this is the bit your program has to do:
        Determine from which file you got data
        Execute appropriate code

Typically you would use input indicators to determine the file and fire 
the appropriate subroutine.


>One last question.  There is a possibility that a record might be
>missing from either file, causing the synchronization of the input
>streams to be out of whack.  If this is the case, Can I issue a READ
>op in the calc specs to either file to re-synch the files?

No. The cycle does all the reading. It is possible though to open a file 
more than once, using different names (EXTFILE in RPG or OVRDBF before 
opening) and different attributes.

Joep Beckeringh

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.