Vesoft users - Hewlett Packard

This is a discussion on Vesoft users - Hewlett Packard ; I'm trying to find a better way to capture how many users are accessing a file and set a var or use an "if" statement such as "if num_accessors(file_name) > 0 then" I can't find anything in Vesoft that will ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Vesoft users

  1. Vesoft users

    I'm trying to find a better way to capture how many users are accessing
    a file and set a var or use an "if" statement such as "if
    num_accessors(file_name) > 0 then"

    I can't find anything in Vesoft that will set a var and I don't see
    anything in Finfo that will capture that number.

    Does anyone have a solution for this?


    Thanks for the help,

    Larry A. Barnes
    Systems Administrator - HP3000


    * To join/leave the list, search archives, change list settings, *
    * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *


  2. Re: Vesoft users

    I'd be more interested in what you do with the users after you capture
    them. Would you send them to secret HP prisons or Gitmo? (We already
    have HP wiretapping.)

    Larry Barnes wrote:
    > I'm trying to find a better way to capture how many users are accessing
    > a file and set a var or use an "if" statement such as "if
    > num_accessors(file_name) > 0 then"
    >
    > I can't find anything in Vesoft that will set a var and I don't see
    > anything in Finfo that will capture that number.
    >
    > Does anyone have a solution for this?
    >
    >
    > Thanks for the help,
    >
    > Larry A. Barnes
    > Systems Administrator - HP3000



    --
    BT

    Tracy Johnson
    Justin Thyme Productions
    Ye olde free telnet games at:
    http://hp3000.empireclassic.com/







    NNNN

    * To join/leave the list, search archives, change list settings, *
    * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *


  3. Re: Vesoft users

    --- Larry Barnes wrote:

    > I'm trying to find a better way to capture how many users are
    > accessing a file and set a var or use an "if" statement such as "if
    > num_accessors(file_name) > 0 then"
    >
    > I can't find anything in Vesoft that will set a var and I don't see
    > anything in Finfo that will capture that number.
    >
    > Does anyone have a solution for this?


    of course :-)

    here's the script:

    setvar _ra_eof1 finfo(HPSTDIN,"eof")
    while setvar(_ra_eof1,_ra_eof1-1) >= 0
    setvar _ra_rec rtrim(input())
    if pos('FILE:',_ra_rec) > 0
    setvar _ra_file word(_ra_rec,' ',2)
    endif
    if pos('Accessor',_ra_rec) > 0
    if _ra_rec <> '0 Accessors'
    echo !_ra_file : !_ra_rec
    endif
    endif
    endwhile

    here's the script in action:

    :listfile @,access>dsgtemp
    :rptacces < dsgtemp
    CATALOG.PUB.SYS : 379 Accessors(O:379,P:379,L:0,W:0,R:379),Share
    CI.PUB.SYS : 98 Accessors(O:98,P:98,L:0,W:0,R:98),Share
    CMSTORE.PUB.SYS : 1 Accessor(O:1,P:1,L:0,W:0,R:1),Share
    COBCAT.PUB.SYS : 1 Accessor(O:1,P:1,L:0,W:0,R:1),Share
    DSTLGTAB.PUB.SYS : 1 Accessor(O:1,P:1,L:0,W:1,R:1),Exclusive
    DSTLID.PUB.SYS : 1 Accessor(O:1,P:1,L:0,W:1,R:1),Exclusive
    DSTRINS.PUB.SYS : 1 Accessor(O:1,P:1,L:0,W:1,R:1),Exclusive
    <>

    for a specific file:

    :listfile catalog,access>dsgtemp
    :rptacces dsgtemp2
    :input x :echo ![word(x,": ",2)]
    379

    hth - d

    Donna Hofmeister, HP-CSA Sr. System Programmer
    dgarverick -at- longs -dot- com
    925-210-6631 Longs Drug Stores

    >>>MY opinions, not Longs Drug Stores'<<<


    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com

    * To join/leave the list, search archives, change list settings, *
    * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *


+ Reply to Thread