Putting a pause in Quick - old VMS/RMS issue

Joe Boyle atla38 at dsl.pipex.com
Tue Jun 21 05:43:49 CDT 2005


I'm a little surprised that the error below ( screen IO breaking locks )
wasn't picked up, given that this affects file locks only. Having said that,
there is a reason for this mistake which goes as follows - you might want to
check if this affects your system.

About eight years ago I was working with PH7 on VMS with RMS files. I had
added an internal procedure which went something like that below but I had
forgotten to add the unlock syntax ( back then, it was thought that run
commands also affected locks which is why we did'nt use a DCL wait command
for the delay),

  Let t'val = 0

  Lock recname record
  Get recname using ... via... optional

  While t'val lt 1000000 ( or whatever time lapse you need )
  begin
  let t'val = t'val + 1
  end
  .
  .
  Put recname reset
  ; unlock recname - at the time I had forgotten to add this line

during testing the process worked ok and the lock was confirmed but only
then did I realize I had no unlock syntax. This meant that when the second
screen was called it should have continued to wait for the time out or until
the first screen was updated.

It turned out that the put command was releasing the lock - this was
confirmed by placing the while loop after the put command ( at this stage
there was still no unlock command ), with this setup the second screen ran
almost immediately because the lock was released after the put command and
before the while loop had started.

In this case there wasn't a problem because the lock was only needed up
until the put - but I inserted the unlock syntax for clarity.

Regards, Joe.


-----Original Message-----
From: powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com
[mailto:powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com] On Behalf Of
Joe Boyle
Sent: 21 June 2005 00:05
To: 'Mary McNairney'; powerh-l at lists.sowder.com
Subject: RE: Putting a pause in Quick

You don't say which PH version you are using or file system, but in general
you have to avoid screen IO because the lock will be broken if this occurs.

I would ordinarily use a loop like that below 

Let t'val = 0

Lock recname record

While t'val lt 1000000 ( or whatever time lapse you need )
begin

let t'val = t'val + 1

end
.
.
unlock recname 

then run the same screen from other logins to confirm conflicts.

Regards, Joe. 

________________________________________
From: powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com
[mailto:powerh-l-bounces+atla38=dsl.pipex.com at lists.sowder.com] On Behalf Of
Mary McNairney
Sent: 20 June 2005 23:05
To: powerh-l at lists.sowder.com
Subject: Putting a pause in Quick

Hi,

I am trying to test the locking of a Quick screen. Does anyone know how I
can put a pause in the screen to lock it for long enough for my qtp process
to find it is locked? I have tried doing multiple FOR loops with the inner
loop actually updating a file, but it still runs too fast. 

Mary.

-- 
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l at lists.sowder.com
Subscribe: "subscribe" in message body to powerh-l-request at lists.sowder.com
Unsubscribe: "unsubscribe <password>" in message body to
powerh-l-request at lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.



More information about the powerh-l mailing list