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



Did you put the program under debug to see what record the program had when L1 was on (Total time)?

Before we had debuggers (S/3) problems, excuse me, opportunities like this always meant going back to the Detailed RPG Cycle diagram and accompanying text. Today I would try the debugger first.

Jerry C. Adams
IBM System i Programmer/Analyst
--
B&W Wholesale
office: 615-995-7024
email: jerry@xxxxxxxxxxxxxxx


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Robert Nesiba
Sent: Thursday, April 23, 2009 3:39 PM
To: RPG programming on the IBM i / System i
Subject: Re: Update primary filre

We thought of that, but were hoping for something even easier.
Is it simply "in the nature" of the matching record processing that
prevents us from updating back into the primary file record?
In our data, there is always just one primary, and none, one, or several
secondary rcds.
With match record is the primary just not-available-for-update at total
time?
Thanks.


Wintermute, Sharon wrote:
Any reason you can't use a logical over the same input file as a third
output only file? That way you would not have to change the input
primary at all.


Sharon Wintermute

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Robert Nesiba
Sent: Thursday, April 23, 2009 3:05 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Update primary filre

We have an old, large program (that we don't want to rewrite) which
processes a primary file and a secondary file using L1 M1 processing.
Both files are currently input only, and externally defined. At L1
total time an answer is calculated that we want to write back into the
primary file. When we change the primary to update capable, the L1
answer gets written into the subsequent record. We have tried both
UPDATE and EXCEPT, and get the same result: data updates the wrong
(subsequent) record. What's the best (or the easiest way) to update the
correct primary file record? Thanks!




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.