Waiting on lock.....
Peter Bateman
shediac92@hotmail.com
Tue, 04 Mar 2003 15:33:11 -0400
Esh I:
Not easily.
You could test the waters with a 3GL conditional lock attempt.
After getting the lock you will have to unlock in the 3GL code.
This creates the possibility that someone else may get the
lock before you do in QUICK.
i.e. DO EXTERNAL MYLOCK ( FILE_NAME, FILE_STATUS )
IF "OK" <> FILE_STATUS
BEGIN
; bad FILE_STATUS processing
Looks like an enhancement request to have a status word like ACCESSOK
after a lock.
You could set UNCONDITIONAL locking in QKGO. This would have the
effect of waiting until the file is unlocked without an information
statement.
OR
You could change message for 'Waiting on lock' to blanks in QKMSG I believe.
This should get rid of the Waiting message. Reduce the lock re-try interval
in QKGO.
You could set a TEMPORARY item to indicate the success or not of
the lock.
ie
TEMPORARY LOCK_OK integer size 2 reset at startup
Let LOCK_OK = 0
LOCK FILE ...
; lock timeout should have the status of ERROR and therefore abort
; the UPDATE procedure.
Let LOCK_OK = 1
Now all actions are going to have to test LOCK_OK. Like I said not
easily.
Regards,
Peter Bateman
>From: "Esh I" <esh78@rediffmail.com>
>Reply-To: "Esh I" <esh78@rediffmail.com>
>To: powerh-l@lists.swau.edu
>Subject: Waiting on lock.....
>Date: 4 Mar 2003 14:01:34 -0000
>
>In my program i have set a lock on one of my files. When run concurrently i
>dont want my program to wait on that lock and display an error message once
>the wait time expires. Rather i would like my program to do something else
>once it finds that the required file has been locked.
>Can i make this happen?
>
>Thanks
>Esh I
>
>= = = = = = = = = = = = = = = = = = = = = = = = = = = =
>Mailing list: powerh-l@lists.swau.edu
>Subscribe: "subscribe" in message body to powerh-l-request@lists.swau.edu
>Unsubscribe: "unsubscribe" in message body to
>powerh-l-request@lists.swau.edu
>http://lists.swau.edu/mailman/listinfo/powerh-l
>This list is closed, thus to post to the list you must be a subscriber.
_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus