Rocket U2 | UniVerse & UniData

Expand all | Collapse all

[UNIVERSE 11.3.1] UV Basic - STATUS()

  • 1.  [UNIVERSE 11.3.1] UV Basic - STATUS()

    Posted 09-15-2021 09:33
    Hi Lappies

    I have forwarded your issue to the rocket support forum …

    Good day

    On Universe version 11.2.3 and earlier we had the following logic and it was working 100%.

    We used the following command to determine if a record is already locked by another user. Using STATUS() Command to return the Pid no of the user.

    In the example below, I locked a record from another session. The command above returned the record was locked by Pid 3116.
    From the LISTU command we can then determine the user “SUPPORT” is locking the record.

    PS! Please note that the PID no in LISTU and the USERNO in LIST.READU is exactly the same. 3116

    The problem we have now is that we have found this code does not to work the same on the UV releases after 11.2.3
    I am testing this on UV 11.3.1

    I locked a record , then ran my program (Image 1) and it returned PORT = 2.
    From the LISTU below you can see there is no PID 2 , but when doing a LIST.READU there is a USERNO 2

    Before the PID and USERNO were the same but they are different now.

    Can you please provide a simple solution to this problem?
    Is there another command to use instead of STATUS() to determine the PID no that is locking the record?

    I know we can use LIST.READU to find the USERNO 2 and get from there the PID 3860 and then via LISTU find the user,
    but we need a simple way to know who the user is (USERNAME) that is locking a record.

    Any help will be appreciated.

    [TecApps ES 4-07]

    Jorge Catalino | Tecfinity Pty Ltd
    Sent from my iPhone

  • 2.  RE: [UNIVERSE 11.3.1] UV Basic - STATUS()

    Posted 09-15-2021 10:35
    Hi Jorge,
    The way user numbers are calculated was changed at the 11.3.1 release. I would suggest reading the section of the 11.3.1 New Features Guide on "UniVerse user number assignment and management".  Particularly, there is a new BASIC function named USERINFO().  The function can take a user number as input and return the corresponding pid for that user. Additionally, the function can take a pid as input and return the user number. For your purposes, this function can be used to take the user number returned by the STATUS() function and return the pid of the process.
    Hope that helps.

    Neil Morris
    Universe Advanced Technical Support
    Rocket Software

  • 3.  RE: [UNIVERSE 11.3.1] UV Basic - STATUS()

    Posted 09-15-2021 11:20
    Thank you

    Jorge Catalino
    Tecfinity Pty Ltd
    Tel +27 11 417 0800
    Fax +27 11 622 6305