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



Alan,

You could use either an OVRDBF, prior both compile and run your program OR
compile it with the OVRDBF and use the EXTFILE keyword in your F-spec. That
way, although the name in the program can be different, in fact you are
using ("pointing") to the same file.

HTH,

Luis Rodriguez
IBM Certified Systems Expert — eServer i5 iSeries


On Tue, Nov 17, 2009 at 4:18 PM, Alan Shore <AlanShore@xxxxxxxx> wrote:


Thanks for your reply Jon
I do in fact need to lock both records. One for update, the other one for
delete.

I'm not saying that RPG cannot handle this process, It just means that I
have to create a new logical with a key that another file already has.



Alan Shore
Programmer/Analyst, Distribution
E:AShore@xxxxxxxxxxx <E%3AAShore@xxxxxxxxxxx>
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill



Jon Paris
<jon.paris@partne
r400.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:17 twice
PM


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






It rather depends on what you what you mean by "process".

If you just want data from two records simultaneously then reading
into a DS (pretty much the same as COBOL's READ ... INTO) would do the
job. Use qualified structures and you don't even have to mess with
renames.

If you mean you need to _lock_ two different records for update then
you either need two files _or_ use commitment control on a single
file. I would use CC personally if it is that important to make sure
that the two records are updated "simultaneously" - having two
separate files etc. won't guarantee that the changes are always in sync.

RPG is no different from COBOL in this regard so I'm not sure what in
your COBOL background makes you think that this is something RPG can't
handle.


Jon Paris

www.Partner400.com <http://www.partner400.com/>
www.SystemiDeveloper.com <http://www.systemideveloper.com/>



On 17-Nov-09, at 2:56 PM, rpg400-l-request@xxxxxxxxxxxx wrote:

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?

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

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.