|
Checking for eof is different then checking to see if a record exists. Chain sf1rrn scn01a; If not %eof; Update scn01a; Endif; Chain sf1rrn scn01a; If %Found; Update scn01a; EndIF; The first example will update scn01a even if a record doesn't match. This could generate the error you receive. The second example will only update scn01a if the rrn of the record matches the value of sf1rrn. -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jen Raihala Sent: Friday, March 10, 2006 1:11 PM To: Midrange Systems Technical Discussion Subject: RE: Subfile validation issues Checking for EOF (There are only 42 lines in the subfile and I want to get it going "manually" before stuffing it in a FOR loop). And only updating on the subfile (once everything is correct (and F5 is pressed), a different loop writes to the actual pf) Probably duplicating and making spaghetti out of something that should be 15 lines of code I know, but I am learning slowly. Grizzly Malchow <grizzlym@xxxxxxxxxxxxxxxxxxxxx> wrote: Is sf1rrn equal to the first rrn in the subfile before you chain? When you say EOF are you chaining and checking for %EOF, or chaining and checking for %Found, or both? Are you only updating if the record is %FOUND in the subfile? -----Original Message----- From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jen Raihala Sent: Friday, March 10, 2006 11:59 AM To: Midrange Systems Technical Discussion Subject: RE: Subfile validation issues I have the loop set up to Chain, Validate, Update, Add one to sf1rrn. Rinse, repeat til EOF. Only trouble is, I can't get through the first validate. Because of the "without prior input" error. Subfiles...ya gotta love 'em :o)
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.