"Permission Denied" error
Richard Kreiss
rkreiss at gccconsulting.net
Tue Oct 8 08:40:24 PDT 2013
> -----Original Message-----
> From: filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com
> [mailto:filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com] On
> Behalf Of Boaz Bezborodko
> Sent: Tuesday, October 08, 2013 11:28 AM
> To: filepro-list at lists.celestial.com
> Subject: "Permission Denied" error
>
> I've gotten this error a couple of times, but this is the first time I know what
> was running that probably caused it.
>
> I was running a long job that was processing payments on a few thousand
> invoices at once. (One check for about 9,000 invoices and can take as much
> as an hour to run.) As it processes it accesses a control record for invoice
> numbers and does a protected lookup. While I was running this someone else
> start running a billing operation that generates invoices and accesses this
> same record. Both access the record in protected mode and I was seeing
> where each program was occasionally
> waiting on the other for the record to be unlocked. I got the error
> "Permission Denied" about the time that I think the billing program finished.
>
> In the programing I lookup 'fln -p' each time I want to get a number, read the
> number, increment it, and then use 'WRITE fln' to release the lock like this:
> lookup inv = invno r=("1") -ep
> com(5)=inv(167) ; inv(167)=com(5)+"1" ; WRITE inv
>
> When a program ends it will close the file. Is there something in the process
> that allows Filepro to return deny access instead of returning a record locked
> response such that this error occurs? Even if this is a relative rarity, it still
> happens to me quite often when I happen to have these checks paying off
> large numbers of invoices.
>
> I'm running Windows Filepro 5.6.10R9 to a Samba file server.
Use -w option with your lookup - sample for 5.7 help file
Example:
getzip if:
then: lookup zip=zipcode k=ky i=a -npxw
if: LOCKED(zip)
then: goto ziplkd
......
ziplkd if:
then: p = "Press \r Y \r or \r N \r"
then: msgbox "Zipcode \"" { ky { "\" is locked.\nTry again?",p,"YN"
if: @BK eq "Y" ' Pause for 5 seconds and try again.
then: sleep "5000" ; goto getzip
Is this the type programming you are looking for?
Richard Kreiss
GCC Consulting
Office: 410-653-2813
More information about the Filepro-list
mailing list