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



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

I need an ACCPTH for each detailfile.

Bryan, we are on V5R4. As we have manyfiles duplicated in different libraries, I think we should change the whole library list depending on the data in the masterfile. These duplicate files have always been treated in separate isolated environments, ie a CLP runs first and does a CHGLIBL for the product family being treated.

Now we have single master files regrouping information from all these environments.





-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Booth Martin
Envoyé : mardi 13 janvier 2009 16:46
À : RPG programming on the IBM i / System i
Objet : Re: Problem with duplicated file names

chain (n) That will provide non-locking. If you are read-only, its not a problem. It just works.

David FOXWELL wrote:
Hi,

A similar problem to the one I had using activation groups but for reasons I won't explain, I can't use ACTGRP or TFRGRPJOB.

do %eof(masterfile)
Read masterfile
CHAIN detail file
Myfield = detail file field

enddo

One masterfile, several detail files in different libraries. Program knows which library. Program is batch.

How do I CHAIN to the right detail file, each time leaving the file open for the next read. Lots of other programs will want to be able to access any information from the detail file in the same way.

Thanks.


--
---------------------------------
Booth Martin
http://www.Martinvt.com
---------------------------------

--
This is the RPG programming on the IBM i / System i (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-Ups:
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.