Yep, very old school and what a pain to deal with.

EXTDESC/EXTFILE or local files in a procedure work really well. Thank goodness (and Barbara) for progress and modern RPG.


-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Mark Waterbury
Sent: Wednesday, April 22, 2020 5:15 PM
To: RPG programming on IBM i
Subject: Re: Having the same file open twice in an RPG program

Hi, Buck, and James:

I was going to sugest something like that, but then I thought that it was "too old school" and waited to see others reply with more modern solutions. :-)

Mark



On Wednesday, April 22, 2020, 7:33:37 PM EDT, Buck Calabro <kc2hiz@xxxxxxxxx> wrote:





On Wed, 22 Apr 2020 at 16:24, Charles Wilt <charles.wilt@xxxxxxxxx> wrote:

Still running that v3r2 system?

On Wed, Apr 22, 2020 at 12:10 PM James H. H. Lampert <
jamesl@xxxxxxxxxxxxxxxxx> wrote:

I can't recall ever being able to have the same file open twice in an
RPG program, other than by having two different LFs on the same PF.

I'm pretty sure we used a pattern like this on S/38:

FFOO IP
FBARA IF disk
F          rbar krename rbara
FBARB IF disk
F          rbar krename rbarb

To compile:
ovrdbf bara tofile(bar)
ovrdbf barb tofile(bar)
crtrpgpgm

To execute:
ovrdbf bara tofile(bar)
ovrdbf barb tofile(bar)
call...

My memory isn't what I remember it to be. I can't find the S/38
manuals online anymore, and the oldest reference I have is the V4R4
Softcopy circa 1999. I can't run Library Reader for Windows in Linux
or Windows 10, so I had to spin up a VM to run that venerable 16-bit
application. Incredibly, Microsoft activated my equally ancient copy
of Windows XP over the phone. So now I can read the V4R4 RPG (not ILE)
manual and verify that my memory isn't a total loss.

--buck


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.