× 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 for checking this out. 

As far as I know, if the account you are using with SETGT is at the end of 
the file, SETGT will not move the cursor. But in your program, if you get a 
duplicate key error, you just keep increasing the sequence number, until you 
find an un-used sequence number. That would work. That is much less complex 
than what I came up with. 

I had come up with a strategy that would do the following. Basically, if a 
SetLL finds a record, but SetGT doesn't set %Found on, the records you are 
looking at are at the end of the file. 

Dou Not %Error;
SetLL Acct# Rmemo;

If not %Equal(Mmemo);
out.seq=1;
Else;
SetGT Acct# Rmemo;

If %Found(Mmemo);
out.seq+=1;
Else; // <------This means you are at the end of the file
SetLL Acct# Rmemo;
ReadE Acct# Rmemo;

Dow Not %EOF(Mmemo);
ReadE Acct# Rmemo;
EndDo;

out.seq#+=1;
EndIf;
EndIf;
EndDo;



On 8/24/05, Rich Duzenbury <rduz-midrange@xxxxxxxxxxxxxxxxxxx> wrote:
> 
> Tony,
> 
> I can't duplicate your problem. I think setgt/readpe works fine, even
> at the end of the file.
> 
> 



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.