Locking in PH

kevinwong kevinwong@hk.ublaze.com
Wed, 20 Dec 2000 10:12:32


Thanks a lot Chris, the "lock ... record" works well.

Thank to Jeff too, the "put ... reset" improve the function, but "get ... record 1" gets syntax error.


> -----Original Message-----
> From: Chris Sharman <Chris.Sharman@ccagroup.co.uk>
> To: kevinwong@hk.ublaze.com
> Cc: Chris.Sharman@ccagroup.co.uk, powerh-l@sphere.swau.edu
> Sent: Tue, 19 Dec 2000 09:38:20 +0000
> Subject: Locking in PH
>
>>I store my next invoice number in a one-record direct file which will be
>>updated as the user create new invoice.(seq. no. generation.)But I find ou
>t
>>that the file was never locked when  dup-record error was reported from us
>er.
>>
>>I never expect simple function like seq.-no.-generation will go wrong, is 
>it
>>the problem of choosing file type (Direct organ.)?
>
>The file's fine, I believe (similar to what we use).
>I believe it's a flaw in the Powerhouse locking scheme (or rather in the wa
>y it
>employs the VMS lock management system).
>
>Powerhouse file locking DOES NOT WORK on VMS/RMS across different UIC group
>s
>(bug 290638): as far as I know it has been broken a long time, perhaps fore
>ver.
>
>Powerhouse record locks are RMS record locks (if you're using RMS): tried &
>tested around the world since 1977 & working well.
>Powerhouse file locks, on the other hand, are specific to Powerhouse. They 
>use
>the VMS locking system. If you wish to make a 3gl application use Powerhous
>e
>file locks, you have to use DALOCK.OBJ.
>
>PH file locking uses locks named (count)'Device:xxxxyyyyzzzz' in UIC group
>locking domains (read up on the $enq system service to better understand
>locking). This has the unfortunate effect that two or more users in differe
>nt
>UIC groups can hold the same 'exclusive' lock at the same time independentl
>y.
>In other words, there's no locking at all, unless all your users are in the
>same UIC group (eg [100,*]).
>
>To get locking which works, use "lock invoice_cnt record", and forget all a
>bout
>DALOCK in your 3gl applications. If you _really_ need file locking, use 'op
>en
>file exclusive' or similar, or confine all your users to one UIC group.
>
>The above has been the subject of various support calls from me, and has be
>en
>given bug number 290638. It's unlikely to get fixed, since it's insufficien
>tly
>reported (I was apparently first, early this year, despite it having been
>around for a long time). This may be because TSC's practice was to recommen
>d
>'lock record' when you reported problems with 'lock file', which would of
>course workaround the problem. The only problem is that you can't easily wr
>ite
>a QTP run to use a refnum file (like invoice_cnt) in a way that locks corre
>ctly
>with Quick.
>
>Regards,
>Chris
>_______________________________________________________________________
>Chris.Sharman@CCAgroup.co.uk		http://www.ccagroup.co.uk/
>CCA Stationery Ltd, Eastway, Fulwood, Preston, Lancashire, PR2 9WS.
>= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
>Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
>Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
>This list is closed, thus to post to the list, you must be a subscriber.
>


______________________________________________________________________

Get Your 100Mb, Free Web-based E-mail from uBlaze.com at
http://mail.ublaze.com

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.