-P correct use

Kenneth Brody kenbrody at bestweb.net
Mon Jul 2 08:45:22 PDT 2007


Quoting Dennis Malen (Fri, 22 Jun 2007 16:56:45 -0400):

> If I execute a lookup to a file and do not post to that file and a -P is
> used, will that corrupt anything.

Nothing will get corrupted in this case.  (Unlike modifying unprotected
lookups, which can lead to corruption.)

> After the recent clarification, we understand that if we post we must
> have a -P. and should not have a -P if we are not posting.
>
> What happens if we have a -P and we are not posting. I have some old
> processing that still has the -P. Is it imperative that the -P be
> removed.

While it's not imperative that you remove the unnecessary -P from
lookups you will not be modifying, leaving them in can cause performance
issues.  Because you never write (and, therefore, unlock) the record, it
will remain locked until you end processing, execute the lookup again,
or move off the record via getnext/getprev.  While the record is locked,
any protected lookup to that record (whether the -P was needed or not)
will wait, unless you also use the -W flag.

--
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list