Error when deleting the last record out of a file

Jay R. Ashworth jra at baylink.com
Thu Dec 20 07:36:06 PST 2007


On Sun, Dec 16, 2007 at 04:11:38PM -0600, Mike Schwartz wrote:
> > I'm curious: if you hide the failure of the lookup with -b, how *can*
> > you "do error handling yourself": you don't *know* there was an error.
> 
>     If there isn't any data in a "must fill" field in the record you look
> up, then you know the lookup failed to return a valid record.

"Must fill" isn't an attribute of columns; it's an atttribute of screen
fields.  Since there can be more than one screen that contains a field,
and "must fill" is independently set on each, you cannot, in fact,
safely make that assumption in the abstract, no.

>     For example, if you are confident that every record in a lookup file has
> a social security number in field #1, and the record you looked up returns a
> blank social security in field #1, then you know the lookup failed.  In most
> cases, this saves you writing 1 or more lines of code, and also allows
> processing to continue in a linear fashion, without a goto on the "not
> lkpfile" and without writing any additional error handling. 

On your own head be it, I guess.  :-)

Cheers,
-- jra
-- 
Jay R. Ashworth                   Baylink                      jra at baylink.com
Designer                     The Things I Think                       RFC 2100
Ashworth & Associates     http://baylink.pitas.com                     '87 e24
St Petersburg FL USA      http://photo.imageinc.us             +1 727 647 1274

	     Witty slogan redacted until AMPTP stop screwing WGA


More information about the Filepro-list mailing list