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



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

Follow-Ups:

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.