HP3000-L Archives

April 1998, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Gary Nolan <[log in to unmask]>
Reply To:
Gary Nolan <[log in to unmask]>
Date:
Fri, 24 Apr 1998 13:02:41 -0300
Content-Type:
text/plain
Parts/Attachments:
text/plain (87 lines)
Hi Folks,
A message to anyone using transaction locking in Transact. There appears to be a problem with the status checking.  
Example:
Program Lock01 locks one of the data set and runs in another session.
Program Lock02 tries to lock 3 data sets one of which is the set held by Lock01.
The lock02 program gets lock on the first data set but cannot get second set so it returns a status of 22 the program then loops for a second attempt to lock and even though the data set is still locked  the status is returned as 0 and the program assumes that a lock has been granted but it has not.

Here are samples I used to test this. I am on 5.5 express 4. This problem has been reported to HP and a SR submitted but the lab is back logged and unable to look at problem until June?.
Anyone have any Ideas?

SYSTEM LOCK01,
       BASE=mybase("UPDATA",1,1);

A000-START:
    LEVEL;

    SET(OPTION) NOLOCK;
    LOGTRAN(BEGIN) $HOME,"STARTING LOCK",
                   LOCK(SET-B);

    INPUT "PRESS RETURN TO STOP";

    LOGTRAN(END) $HOME,"END LOCK";
    RESET(OPTION) NOLOCK;

    END(LEVEL);
    EXIT;


SYSTEM LOCK02,
       BASE=mybase("UPDATE",1,1);

DEFINE(ITEM) LOOP                       I(9):
             STAT                       I(9);

A000-START:
    LIST LOOP,INIT:
         STAT,INIT;

    
    DISPLAY "STARTING LOCK";

    SET(OPTION) NOLOCK;
    LEVEL;
    LOGTRAN(BEGIN) $HOME,"STARTING LOCK",
                   LOCK(SET-A,
                        SET-B,
                        SET-C),STATUS;

    LET (LOOP) = (LOOP) + 1;
    LET (STAT) = STATUS;

    DISPLAY
      "Loop>":
       LOOP,NOHEAD:
      "Status>":
      STAT,NOHEAD;

    IF STATUS <> 0 THEN
        DO
        END;
        DOEND;

    END(LEVEL);
    DISPLAY "GOT LOCK";
    LOGTRAN(END) $HOME,"END LOCK";
    RESET(OPTION) NOLOCK;
    EXIT;


<PUB>:RUN LOCK02

STARTING LOCK
Loop> 1          Status> 22

*ERROR: DBLOCK FAILED AS LOGTRAN LOCKS ARE STILL ACTIVE.  (TXC 86) [0.10] [LOCK0
1]
Loop> 2          Status> 0
GOT LOCK

END OF PROGRAM

Gary Nolan
Sydney Steel Corporation
E-mail [log in to unmask]
Ph (902) 564-7982

ATOM RSS1 RSS2