Re: Trouble managing OVRDBF inside a program
Luca Giammattei <[email protected]>
| Newsgroups | gmane.comp.lang.as400.rpg |
|---|---|
| Message-ID | <CABj10vVJtgHF7HCwfT0FUacX4rHixstaWL8hSBk_wVcqbB7wJQ@mail.gmail.com> |
The file is not specified in any F or dcl-f specification. The program does not contain any F or dcl-f specification of its own. Unless OVRDBF does an implicit opening itself. I must add that the closing of the over dub is done by the program, in fact at the next iteration of the cycle the data is written in the default file present in the library list instead of in the file that I would like to replace with the OVRDBF Il giorno lun 2 feb 2026 alle ore 14:51 David Gibbs via RPG400-L < [email protected]> ha scritto: > On Mon, Feb 2, 2026 at 7:46 AM Luca Giammattei <[email protected]> > wrote: > > > doU MyDS(x).companyLib = *blanks; > > If %trim(MyDS(x).companyLib) <> defaultCompany; > > rc=DoCmd('OVRDBF FILE(MyFILE00F) TOFILE(' + > > %trim(MyDS(x).companyLib) + '/MyFILE00F)'); > > > > > Are you closing the file before the OVRDBF and reopening it after? > > The way I've always done that is... > > 1. Code the file as usropn. > 2. Close the file if it's open (use %open bif) > 3. Run the OVRDBF > 4. Reopen the file > 5. Close the file when done > > david > -- > This is the RPG programming on IBM i (RPG400-L) mailing list > To post a message email: [email protected] > To subscribe, unsubscribe, or change list options, > visit: https://lists.midrange.com/mailman/listinfo/rpg400-l > or email: [email protected] > Before posting, please take a moment to review the archives > at https://archive.midrange.com/rpg400-l. > > Please contact [email protected] for any subscription related > questions. > > -- This is the RPG programming on IBM i (RPG400-L) mailing list To post a message email: [email protected] To subscribe, unsubscribe, or change list options, visit: https://lists.midrange.com/mailman/listinfo/rpg400-l or email: [email protected] Before posting, please take a moment to review the archives at https://archive.midrange.com/rpg400-l. Please contact [email protected] for any subscription related questions.