[INHERIT('sys$library:starlet', 'sys$library:pascal$lib_routines')] PROGRAM Use_Getuai(INPUT,OUTPUT); TYPE Item_List_Cell = RECORD CASE INTEGER OF 1: ( { Normal Cell } Buffer_Length : [WORD] 0..65535; Item_Code : [WORD] 0..65535; Buffer_Addr : UNSIGNED; Return_Addr : UNSIGNED ); 2:( { Terminator } Terminator : UNSIGNED ); END; Item_List_Template(Count:INTEGER) = ARRAY [1..Count] OF Item_List_Cell; VAR Item_List : Item_List_Template(4); Username : VARYING [12] OF CHAR; Status : INTEGER; UIC : [VOLATILE] RECORD Member,Group : [WORD] 0..65535; END; BEGIN { Ask for UIC } Item_List[1].Buffer_Length := SIZE(UIC); Item_List[1].Item_Code := UAI$_UIC; Item_List[1].Buffer_Addr := IADDRESS(UIC); Item_List[1].Return_Addr := 0; { Terminate the item list } Item_List[2].Terminator := 0; { Ask for Usename to find UIC for } write('Which username? '); readln(Username); { Get information about Username } Status := $getuai( Usrnam := Username, Itmlst := Item_List); IF NOT ODD(Status) THEN LIB$Stop(Status); WRITELN('The UIC for ',Username,' is [', OCT(UIC.Group,3,3),',',OCT(UIC.Member,3,3),']'); END.