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



Tony Carolla wrote:
> ...
> But at the time the first program went haywire, the above service program
> wasn't being used by the program. There are no triggers on the file. I don't
> have detailed data about when the error happened (I am not currently
> analyzing based on the status code, just using %ERROR).
> 

Charles is right that %FOUND would not be set by the READE, so when you
tested %FOUND, it would still hold the value set by SETGT.

  Dou Not %Error;
    SetGT(E) (Family:Member) MmoRec;
    ReadPE(E) (Family:Member) MmoRec Mm;

    If %Found(Mmemo);
      Mmo.Mmseq#=Mm.Mmseq#+1;
    Else;
      Mmo.Mmseq#=1;
    EndIf;

    Write(E) Mmorec Mmo;
  EndDo;

Maybe this is what happened (I can't guess why the loop finally
terminated with %Error off, though):
- the SetGT found a record with a key higher than (Family:Member)
- the ReadPE failed to read a record with a key equal to
(Family:Member), so it didn't change the contents of Mm
- you went into the %Found section of the "If", because %Found was set
on by the SetGT
- the Write(E) set on %Error because the seq# was not unique, depending
on what had been in Mm before (maybe the initialization 
value of zero)
- the same thing happened over and over with the same seq# being tried
over and over (since Mm.Mmseq# would never change)


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.