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



If the file you are writing to has unique keys (I am assuming account and sequence number), when you write a duplicate record, you should get an error on your write statement (I don't know the status code off hand). If you get the error for a trying to write a duplicate record, you can bump the sequence number and try to write it again.

At 03:07 PM 1/28/2005, you wrote:
I am writing something to create memo records for accounts, detailing
insurance billing denials.  The key to the file is account number and
sequence number, and it requires unique keys.  Basically, my technique
for writing is:

- Chain using account#
- if no matches, sequence=1
- if %Found, SETGT using account#, READP, then add one to the sequnece number.


I am building the outpt record, then performing the above and writing
immediately.  But there still is a chance that somebody is sitting in
the account, and might press enter on a new memo while my program is
trying to add records, causing my program to error trying to write a
duplicate record.  I am trying to visualize a soltion using a DOW loop
and a Monitor group, but I would want the program to keep determining
the next record number and retrying if there was an error.  I am not
sure if I can just ITER if the error is found, or if I have to use a
GOTO.

Any suggestions?

Dave Murvin DRM Enterprises, Inc.



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.