Or
1. Code the file as usropn and define the external file name.
2. Close the file if it's open (use %open bif)
3. Change the external file name
4. Reopen the file and write the records
5. Close the file when done
Don Brown
Senior Consultant
[1]OneTeam IT Pty Ltd
P: 1300 088 400
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of David
Gibbs via RPG400-L
Sent: Monday, 2 February 2026 11:51 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Cc: David Gibbs <david@xxxxxxxxxxxx>
Subject: Re: Trouble managing OVRDBF inside a program
On Mon, Feb 2, 2026 at 7:46 AM Luca Giammattei <luca.giammattei@xxxxxxxxx>
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: RPG400-L@xxxxxxxxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: [2]
https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
[3]
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
--
Message protected by MailGuard: e-mail anti-virus, anti-spam and content
filtering.
[4]
https://www.mailguard.com.au
References
Visible links
1.
https://www.oneteamit.com.au/
2.
https://lists.midrange.com/mailman/listinfo/rpg400-l
3.
https://archive.midrange.com/rpg400-l.
4.
https://www.mailguard.com.au/
As an Amazon Associate we earn from qualifying purchases.