You can rename the files' record formats in the program.
You cannot have the same file twice but you can have and LF and PF.
You just need to use the RENAME keyword for the record formats.
Paul
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Patrik
Schindler
Sent: Tuesday, April 14, 2020 2:24 PM
To: RPG programming on IBM i <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Legacy File handling: Switching between files opened read-only and
read-write
Hello,
when I try to access a table from ODBC in read-write (delete from, update)
and the very same table is opened in a green screen program for update (UF
in file spec), the ODBC-Session will not get access to the table at all.
I was wondering about a good way to work around this problem. Use LFs for
all readonly work within the green screen program, and open the PFs on
demand? Provide two F-specs per PF, one as IF and one as UF? => Does not
work, Compiler complains about that the filename was already referenced.
Other ideas?
I try this with V4R5.
:wq! PoC
PGP-Key: DDD3 4ABF 6413 38DE -
https://www.pocnet.net/poc-key.asc
--
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:
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
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.