That's not the case.
PORT.STATUS shows you what that PID is currently doing when you run it.
Not what it was doing an hour ago for example.
Not what it was doing when it set the lock.
Just what it's doing now.
In Unix/Universe world.

If you are so lucky to know about the lock *right when* it's being set, then 
you are right.
But in my experience that is a very rare occurence.
And in this particular example, he already stated that it was a lock left set 
some time earlier.
You can only know the program being run by that PID if that program is in some 
sort of waiting condition and had been waiting since it set the lock.







-----Original Message-----
From: Jeff Schasny <jscha...@gmail.com>
To: U2 Users List <u2-users@listserver.u2ug.org>
Sent: Thu, Sep 8, 2011 10:30 am
Subject: Re: [U2] Lock Status


I believe that if the program ended the lock would be released, so by 
inding the PID via LIST.READU and then determining the program name 
ssociated with the PID via PORT.STATUS you are identifying the program 
hich currently holds the lock unless the program ends between the 
IST.READU and PORT.STATUS.
At least in my Unix/Universe world.
Wjhonson wrote:
 This won't work unless the program is halted-waiting.
 Most likely it's moved on to do a hundred other things since the lock in 
uestion, but left it hanging because the pid is still living.
 If the pid dies it would release the lock, but for example, even on non-SB 
ystems, phantoms which run constantly can leave locks hanging forever.





 -----Original Message-----
 From: Jeff Schasny <jscha...@gmail.com>
 To: U2 Users List <u2-users@listserver.u2ug.org>
 Sent: Thu, Sep 8, 2011 8:34 am
 Subject: Re: [U2] Lock Status


 Kevin,
 I think that the closest you are going to be able to get is the program 
 n question using LIST.READU to determine the PID and PORT.STATUS to 
 hen find the program. I don't know of any way to dynamically get to the 
 rogram line number from there. You could, of course, just look through 
 he program source and the READUs then make an educated guess from there.
 Kevin King wrote:
  Unfortunately, no love there either John.  I even went to the GETREADU( .. )
  function in BASIC.. nothing there.
  _______________________________________________
  U2-Users mailing list
  U2-Users@listserver.u2ug.org
  http://listserver.u2ug.org/mailman/listinfo/u2-users

    
   
-- 
-----------------------------------------------------------------------
eff Schasny - Denver, Co, USA
schasny at gmail dot com
-----------------------------------------------------------------------
______________________________________________
2-Users mailing list
2-us...@listserver.u2ug.org
ttp://listserver.u2ug.org/mailman/listinfo/u2-users

_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to