  Wildcard access to SYSUAF? 
 The Question is:
 
Is there a way to get all the SYSUAF records, or to get them all one at a
time?  GETUAI seems to require a specific system name to get SYSUAF data.
 
I'm actually supporting V5.5-2, V6.2 and V7.1 and higher.
 
Thanks.
 
 
 The Answer is :
 
    You will likely want to use RMS calls to walk through SYSUAF to obtain
    the usernames, then call $getuai for details.  (Direct access to SYSUAF
    is not officially supported, and the internals of SYSUAF are subject
    to change without notice -- the OpenVMS Wizard strongly encourages
    you to identify and use only the keys within the file, via XABKEY and
    configuring the appropriate number of keys for the file using XABSUM.)
 
    The included example walks the primary key (and thus assumes it is
    a text key, and contains the username), and passes the username to
    sys$getuai and to OpenVMS callable MAIL$ functions for further
    processing.
 
 
      int user_context=0, int uai_context=-1, status = SS$_NORMAL;
      short new_messages = 0;
 
    main (int argc, char *argv[])
    {
    struct FAB      fab;
    struct RAB      rab;
    item
      user_item[] = { 0, MAIL$_USER_USERNAME, &amp;user, 0}, terminator},
      set_items[] = { 0, MAIL$_USER_PERSONAL_NAME, &amp;pers, 0, terminator},
      get_items[] = { 255, MAIL$_USER_PERSONAL_NAME, &amp;pers, &amp;retlen,
                                terminator},
      uai_items[] = { 32, UAI$_OWNER, &amp;owner, 0, terminator };
    desc
      user_desc   = { 0, &amp;buf };
 
    char buf[BUFSIZ], user[13], pers[255];
    struct { char len, dat[31+1]; } owner;
 
    fab = cc$rms_fab;
    rab = cc$rms_rab;
 
    fab.fab$b_shr = FAB$M_SHRPUT;
    fab.fab$b_fac = FAB$M_GET;
    fab.fab$l_fna = "SYSUAF";
    fab.fab$b_fns = 6
    fab.fab$l_dna = "SYS$SYSTEM:.DAT";
    fab.fab$b_dns = strlen (fab.fab$l_dna);
 
    rab.rab$l_fab = &amp;fab;
    rab.rab$l_ubf = (char *) &amp;buf
    rab.rab$w_usz = BUFSIZ
 
    stat = MAIL$USER_BEGIN(&amp;user_context, &amp;null_list, &amp;null_list);
    if (!(stat&amp;1)) return stat;
    stat = SYS$OPEN ( &amp;fab );
    if (!(stat&amp;1)) return stat;
    stat = SYS$CONNECT ( &amp;rab );
    while (stat &amp; 1) {
        stat = SYS$GET ( &amp;rab )
        if (!(stat &amp; 1)) break;
        stat = SYS$GETUAI (0, &amp;uai_context, &amp;user_desc, &amp;uai_items, 0, 0);
        if (!(stat &amp; 1)) break
        owner.dat[owner.len] = 0;
        stat= MAIL$USER_GET_INFO(&amp;user_context, user_item, get_items);
        pers[retlen] = 0
        printf (%12.12s %31.31s %30.30s\n", &amp;buf, &amp;owner.dat, &amp;pers);
        }
    if (stat == RMS$_EOF) stat = RMS$_NORMAL;
    if (stat&amp;1) stat = MAIL$USER_END(&amp;user_context, &amp;null_list,
    &amp;null_list);
    if (stat&amp;1) stat = SYS$CLOSE(&amp;fab);
    }
 
 
 Answer written or last revised on  30-JUL-2003 
