|
That's it. Now I get it *light bulb turns on* SETGT is positioning the file to EOF, and READPE is working, but I am basing my test on %FOUND, which is not touched by READPE. If I, as you say, base my test on %EOF, then the decision structure will be based no the READPE. I changed the code to: Dou Not %Error; SetGT(E) (Family:Member) MmoRec; If %Error; ExSR FileError; EndIf; ReadPE(E) (Family:Member) MmoRec M; If %Error; ExSR FileError; EndIf; If %EOF(CMmemo); Mo.Mmseq#=1; Else; Mo.Mmseq#=M.Mmseq#+1; EndIf; Write(E) MmoRec Mo; EndDo; Thanks to all that helped. Hmmm... That makes me think. Shouldn't READPE set a %BOF function -- because it's at the beg.... <--- Proof I think too hard about stuff ;-) On 8/25/05, Rick.Chevalier@xxxxxxxxxxxxxxx <Rick.Chevalier@xxxxxxxxxxxxxxx> wrote: > > > Tony, > > Try changing your %FOUND to %EOF. The %Found condition is set off by the > SETGT operation. The READPE sets %EOF when it reads the last records not > %FOUND. Checking %FOUND as you are doing below will fail and use 1 as your > sequence number because it is using the results of the SETGT operation. The > READPE isn't failing, the results just aren't being checked. > > This will only happen at the end of the file because the SETGT operation > will always find a record for all other points in the file and %FOUND will > be on. > > HTH, > > Rick
As an Amazon Associate we earn from qualifying purchases.
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.