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



Dick,

do you perhaps have commitment control set on for the second file and not 
for the first?

IIRC, changes are not visible in the database until you perform a COMMIT.

This could explain what you are seeing, I think.

(I may be wrong about this, commitment control is quite some time ago).

HTH,

Peter Colpaert
Application Developer
PLI - IT - Kontich, Belgium
-----
Yoda of Borg are we.  Futile is resistance, assimilated will you be.
-----



"Dick Superneau" <DSuperneau@xxxxxxxxxxxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
07/09/2006 00:40
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
<rpg400-l@xxxxxxxxxxxx>
cc

Subject
Deleted record still seen






I am looking for some help with two similar procedures that behave
differently.  I have a program that uses procedures to perform the file
updates that are requested by the user.  During a loop through the
program, the user can request a record to be deleted.  This deletion can
then cause a record from another file to also be deleted.  When I use
debug to walk through the program, I can stop the program at the point
right after both deletions have occurred.  At this point, I do not see
the records in the files.  The program returns to the top of the loop
and calls two similar procedures to renumber the sequence fields in the
two files.  When the first procedure is called, nothing happens as the
parameters that are passed in do not match any record in the file.  When
the second procedure is called however, a record is found on the read
statement- the one that was deleted.  Since there is no such record, the
update causes the program to crash.  The procedures are in a service
program that has *CALLER as the activation group.  Each of the
procedures has usropn specified for the file that is being used.  The
first called procedure treats the file correctly and does not see the
deleted record, but the second procedure seems to think there is a
record in the second file even though it has been deleted.

 

The two files are input only files in the calling program.  I have
thought that there might be a snapshot of the second file created when
the program opens and this is why the program thinks there is still a
record in the file because the view of the file has not been refreshed.
However, it doesn't explain why the similar snapshot of the first file
doesn't behave in the same manner.  I hope this makes sense.  Any help
will be appreciated. 

 

Thanks, Dick




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.