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

1) If the library name is a field in the master PF, then sequence the
records in the master PF.

2) Make the detail PF USROPN and before you open the file, change the
values for EXTFILE keyword.. Then open th detail PF.

3) If the library name from the master PF changes, then clode the detail PF
and return to step 2.

No clutter of numerous renames, subprocedures, etc.

With regards,
Carel Teijgeler

*********** REPLY SEPARATOR ***********

On 13-1-2009 at 17:00 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

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.

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



No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.10.6/1888 - Release Date: 12-1-2009
7:04




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.