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



David FOXWELL wrote:
First read of masterfile :
ovrdbf to detailfile in lib1 or addlible lib1 in correct position
Chain to detailfile reads file in lib1

Second read of masterfile
ovrdbf to detailfile in lib2 or addlible lib2 in correct position
Chain to detailfile still reads file in lib1 because still open

[W]e are on V5R4.

I can think of a way of doing this, but it isn't particularly pretty. Nor is it tested, but I've done something similar before. You could define a different F-spec for each library's detail file, renaming the record formats and prefixing the fields as appropriate.

Fdetail IF E K DISK EXTFILE('LIB1/detail')
F RENAME(detail:L1det)
F PREFIX('L1')
Fdetail IF E K DISK EXTFILE('LIB2/detail')
F RENAME(detail:L2det)
F PREFIX('L2')

Then, your read logic would look like
do %eof(masterfile)
Read masterfile
select
when library = 'LIB1'
chain L1Det
when library = 'LIB2'
chain L2Det
endsl
Myfield = detail file field

Hope this helps,
Adam

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.