|
Here's the sitch: I have a file that contains contract definitions (GROUP), and a second file that contains renewal instances of these contracts (GCONV), with renewal dates. Any contract would have only one GROUP record, and can have multiple GCONV records, one for each date range of the contract. My task is to find contract instances that need renewing for the beginning of next year, and create new GCONV records for these. What I am doing is searching through the GCONV file for any expiring contracts as of a prompted date. For each record I find, I would _like_ to then search the file to see if this particular contract has already been renewed. With no logical files built over the GCONV file, I am trying to open the same file, with two F-specs, as follows: FGCONVRD IF E DISK EXTFILE(FILEGCONV) BLOCK(*YES) F USROPN FGCONVCK IF E K DISK EXTFILE(FILEGCONV) USROPN PREFIX(CK) F RENAME(GRMREC:GRMREC2) I had to rename the record format, or the compiler ignored the spec. Also, to get this to compile, I had to OVRDBF each file to point to a separate copy of the GCONV file. The problem is that when the program runs, as soon as I OPEN the second file, I get an RNX1215 - OPEN was issued to opened file GCONVRD. My question -- is this even possible? Is there a way to have the RPG program open the same physical file twice? We have over 50 data libraries with copies of the same files in each, and it would be non-desirable to create any LF's in each library. Right now, I am solving this by writing a separate program that will run in place of this small routing.
As an Amazon Associate we earn from qualifying purchases.
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.