× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




Thanks for your reply Chuck
As in one of my earlier replies

The problem with this is that someone else may come along to maintain this
program. Even with detailed documentation within the program, there's no
guarantee that the other programmer will read it.

If I can just create a program that will compile/promote without having to
do something different from the norm, it will make life easier




CRPence
<CRPbottle@yahoo.
com> To
Sent by: rpg400-l@xxxxxxxxxxxx
rpg400-l-bounces@ cc
midrange.com
Subject
Re: D-spec using the same file name
11/17/2009 03:29 twice
PM


Please respond to
RPG programming
on the IBM i /
System i
<rpg400-l@midrang
e.com>






Establishing two separate Open Data Paths [ODP] allows using the
same file twice in the a HLL program; available since S/38. The
open & I/O would be directed against the same file [member & data],
as established by overrides from two separate /labels/ [names] in
the program F-specs, redirecting to the one file.mbr:

OVRDBF FILE1 TOFILE(TheLib/TheFile) MBR() SHARE(*NO)
OVRDBF FILE2 TOFILE(TheLib/TheFile) MBR() SHARE(*NO)
Both Declare [for compile] & Open [for run-time] the two separate
labels FILE1 & FILE2, both overridden to the one\same file, would
effect non-shared opens of the one file named TheFile in TheLib;
i.e. establishing two ODPs, as two separate OPENs in the program.

I am not entirely sure of the Declarative statements for
row.field data, but for having the separate /files/ from the
perspective of the RPG program, I presume it would be no different
than handling two files of the same name in different libraries.
That can be resolved with similar overrides, as alluded in a recent
thread on 10-Nov-2009; in part, by rename the record format of one.?

"Compiling a program with two files having the same name"
http://archive.midrange.com/rpg400-l/200911/msg00066.html

Regards, Chuck

Alan Shore wrote:
<<SNIP>>

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?

<<SNIP>>
--
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.

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.