Hi Allan,
Why don't you just use a different file name, with a name of your
choosing, in your program in the D specs? Then, in your CL you just have
to do an OVRDBF to the actual file name.
Also, you will have to have an override in effect when you compile your
program.
Thanx,
Nick
Nick Radich
Sr. Programmer/Analyst
EPC Molding, Inc.
Direct (320) 679-6683
Toll free (800) 388-2155 ext. 6683
Fax (320) 679-4516
nick_radich@xxxxxxxxxxxxxx
Alan Shore <AlanShore@xxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
11/17/2009 02:04 PM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
To
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
cc
Subject
Re: D-spec using the same file name twice
Thanks for your reply Bob
In my mainframe COBOL days, I used this trick ALL the time, It was a god
send
It just meant that you could get 2 different records using the same access
key from what looked like 2 different files (internally within the program
one or both "files" was/were qualified) , but externally, it was the same
file
It looks like I will have to create a new logical
Alan Shore
Programmer/Analyst, Distribution
E:AShore@xxxxxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill
"Bob P. Roche"
<BRoche@packaging
corp.com> To
Sent by: RPG programming on the IBM i /
rpg400-l-bounces@ System i <rpg400-l@xxxxxxxxxxxx>
midrange.com cc
Subject
11/17/2009 02:53 Re: D-spec using the same file name
PM twice
Please respond to
RPG programming
on the IBM i /
System i
<rpg400-l@midrang
e.com>
At the same time? Wouldn't it be easier to process one then process the
next? I've renamed formats, using multiple logical files (with different
keys), so your logical idea should work, but I've never tried to use the
same actual file 2 times in the same program.
From:
Alan Shore <AlanShore@xxxxxxxx>
To:
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
Date:
11/17/2009 01:44 PM
Subject:
D-spec using the same file name twice
Sent by:
<rpg400-l-bounces@xxxxxxxxxxxx>
Afternoon all
I know at one point, what I am about to ask is not feasible in RPG (COBOL
is another matter), but the last time I asked this was when I had first
moved over from mainframe COBOL to AS/400 RPG. (TOO many moons ago)
Can you specify the same file name (physical or logical) more than once in
a program?
I want to process 2 separate records by using the same key, or do I have
to
create a new logical with the same key as the file that already exists?
I almost forgot - we are on V5r4
As always - many thanks in anticipation
Alan Shore
Programmer/Analyst, Distribution
E:AShore@xxxxxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.