× 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 Booth, I had thought along those lines but didn't follow through,
it is less messy I think.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Booth Martin
Sent: Tuesday, January 23, 2007 6:21 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: checking if a delete occurs

Here is another choice might work for you:

Each record has a RRN (relative record number) which is unique.  You can

retrieve this number when you read the record from the file, and store 
the number as a hidden field in the subfile record.  Then, have another 
F-Spec for the same file, unkeyed, and chain to the second file with the

RRN for update, add, and deletes.





Phil Kestenbaum wrote:
HI I have a program that displays records in a subfile, there is a not
very unique key so that in order to allow for Change, Add.  and
Delete,
I set up a logical for the delete and changes.

The record is to simplify:

 

Acct       comment

 

The key is Acct.

 

 

There file is this not unique. There are many same accounts w/ various
comments.

The user would be able to change the comment field, although mostly
they
are adding comments.

So to make a change you cannot know  which record is needed to change
since there are many w/ same acct#. I therefore made a logical file of
acct and comment.

 

(there are many other fields in this file). Thus for same acct-comment
key we can do a READE and change it on all, although it would be
unlikely for such a case.

 

The issue is that when you Chain to the file w/ the changed comment
field, it is not found, in this case there seems to be a 2 step
process.
First to delete the old record having saved the comment, and then to
add
the new record. But I am finding that the Delete is not working. I
start
another session and check the record count and it is not 1 less. So I
wanted to debug this condition as to why the delete is not working. 

 

Any ideas would be greatly appreciated,

Thank you,

Phil

 

 


This message contains information proprietary to our company. It is
intended to be read only by the individual or entity named above or
their designee.
Any distribution of this message or the information contained herein
without written permission from our company is strictly prohibited. If
the reader of this message is not the intended recipient or an agent
responsible for delivering it to the intended recipient, you are hereby
notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is
strictly prohibited. If you have received this communication in error,
please notify us immediately by e-mail, and delete the original message.




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.