Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (T-V)
Guardian Procedure Calls Reference Manual—522629-013
15-49
USER_GETNEXT_ Procedure
Considerations
•
Aliases are defined only when Safeguard software is installed.
•
This procedure returns a user name when is-alias is set to 0 on input and when 
is-alias returns 0 on output.
•
This procedure returns an alias when is-alias is not set to 0.
•
When the names are returned, user names are returned first and aliases are 
returned last. Furthermore, the return sequence is not circular: a user name never 
follows an alias. User names are not returned in any particular order, and the 
order can change from one RVU to the next. Similarly, aliases are not returned in 
any particular order and the order can change from one RVU to the next.
Example
! put all user names on a system into name^list and
! put all aliases on a system into alias^list
error := 0;
is^alias := 0; 
name^entry := 0; 
search^len := 0;
WHILE (error <> 0 and NOT is^alias) DO
 BEGIN
 error := USER_GETNEXT_
 (search^name:32, search^len, is^alias);
 name^list[name^entry].name ‘:=‘
 search^name FOR search^len BYTES;
 name^list[name^entry].len := search^len;
 name^entry := name^entry + 1;
 END;
IF is^alias THEN
 BEGIN
 alias^entry := 0; 
 search^len := 0;
 ! decrement name^entry, because it was an alias
 name^entry := name^entry - 1;
 WHILE (error <> 0) DO
 BEGIN
 error := USER_GETNEXT_
 (search^name:32, search^len, is^alias);
 alias^list[alias^entry].alias ‘:=‘
 search^name FOR search^len BYTES;
 alias^list[alias^entry].len := search^len;
 alias^entry := alias^entry + 1;
 END;
 END;
IF error THEN
 BEGIN
 ! do error handling
 END










