How do I get the next UIC in MCR Authorize? - VMS

This is a discussion on How do I get the next UIC in MCR Authorize? - VMS ; Not in code, just from the command line. I created a new user with copy user1 user2 /password=newpassword and, as expected, they have the same uic. I know the first number [first, ?], but not what to put for the ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: How do I get the next UIC in MCR Authorize?

  1. How do I get the next UIC in MCR Authorize?

    Not in code, just from the command line. I created a new user with
    copy user1 user2 /password=newpassword and, as expected, they have the
    same uic. I know the first number [first, ?], but not what to put for
    the second number. How do I get that second number? Thank you.


  2. Re: How do I get the next UIC in MCR Authorize?

    On Sep 12, 9:29 am, jmDesktop wrote:
    > Not in code, just from the command line. I created a new user with
    > copy user1 user2 /password=newpassword and, as expected, they have the
    > same uic. I know the first number [first, ?], but not what to put for
    > the second number. How do I get that second number? Thank you.


    I don't know if this is the best way but it works:

    $!+ OPS_NEXT_UIC.COM
    $!
    $!! PURPOSE: To find the next available UIC.
    $!
    $ N = 0
    $ _GROUP_NUMBER = P1
    $ _BLANK = " "
    $_LOOP:
    $!
    $ N = N + 1
    $ _MEMBER_NUMBER = F$FAO("!OW",N)
    $ UIC_INT = (%O'_MEMBER_NUMBER' + (%X10000 * %O'_GROUP_NUMBER'))
    $ UIC_NAME = F$IDENTIFIER(UIC_INT,"NUMBER_TO_NAME")
    $ IF (UIC_NAME .NES. "") THEN $ GOTO _LOOP
    $ UIC = F$FAO("!%U",UIC_INT)
    $ WRITE SYS$OUTPUT "The next available UIC is ''UIC'."
    $ EXIT

    AEF


  3. Re: How do I get the next UIC in MCR Authorize?

    In article <1189603763.854330.283540@d55g2000hsg.googlegroups. com>, jmDesktop writes:
    > Not in code, just from the command line. I created a new user with
    > copy user1 user2 /password=newpassword and, as expected, they have the
    > same uic. I know the first number [first, ?], but not what to put for
    > the second number. How do I get that second number? Thank you.
    >


    I simply:

    UAF> show/brief [group,*]

    then choose an octal number not yet used. Whether or not you need
    an automated way of doing this depends on how many users you have.


  4. Re: How do I get the next UIC in MCR Authorize?

    jmDesktop wrote:
    > Not in code, just from the command line. I created a new user with
    > copy user1 user2 /password=newpassword and, as expected, they have the
    > same uic. I know the first number [first, ?], but not what to put for
    > the second number. How do I get that second number? Thank you.
    >


    AFAIK, it can't be done "from the command line". I have a bit of DCL
    written years ago by Nick DeSmith and tweaked a little by yours truly,
    that takes the "group" and searches the UAF for the next available user
    number. It's part of a larger procedure I wrote to create an account
    without going through all the agony of remembering the necessary steps
    and qualifiers. It does the whole thing A-Z including creating the
    user's home directory and creating a sample LOGIN.COM.

    If requested to do so, I'm willing to dust it off, move it over to my PC
    and post it to this newsgroup.


  5. Re: How do I get the next UIC in MCR Authorize?

    On Sep 12, 10:28 am, koeh...@eisner.nospam.encompasserve.org (Bob
    Koehler) wrote:
    > In article <1189603763.854330.283...@d55g2000hsg.googlegroups. com>, jmDesktop writes:
    >
    > > Not in code, just from the command line. I created a new user with
    > > copy user1 user2 /password=newpassword and, as expected, they have the
    > > same uic. I know the first number [first, ?], but not what to put for
    > > the second number. How do I get that second number? Thank you.

    >
    > I simply:
    >
    > UAF> show/brief [group,*]
    >
    > then choose an octal number not yet used. Whether or not you need
    > an automated way of doing this depends on how many users you have.


    Thanks everyone. I used the show /brief.


  6. Re: How do I get the next UIC in MCR Authorize?

    AEF wrote:
    > $!+ OPS_NEXT_UIC.COM
    > $!
    > $!! PURPOSE: To find the next available UIC.
    > $!
    > $ N = 0
    > $ _GROUP_NUMBER = P1
    > $ _BLANK = " "
    > $_LOOP:
    > $!
    > $ N = N + 1
    > $ _MEMBER_NUMBER = F$FAO("!OW",N)
    > $ UIC_INT = (%O'_MEMBER_NUMBER' + (%X10000 * %O'_GROUP_NUMBER'))
    > $ UIC_NAME = F$IDENTIFIER(UIC_INT,"NUMBER_TO_NAME")
    > $ IF (UIC_NAME .NES. "") THEN $ GOTO _LOOP
    > $ UIC = F$FAO("!%U",UIC_INT)
    > $ WRITE SYS$OUTPUT "The next available UIC is ''UIC'."
    > $ EXIT


    As 0 is a valid member number, the initialization should be N = -1.

    cu,
    Martin
    --
    One OS to rule them all | Martin Vorlaender | OpenVMS rules!
    One OS to find them | work: mv@pdv-systeme.de
    One OS to bring them all | http://vms.pdv-systeme.de/users/martinv/
    And in the Darkness bind them.| home: martin.vorlaender@t-online.de

+ Reply to Thread