Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!ucbcad!ucbvax!CITHEX.CALTECH.EDU!carl From: carl@CITHEX.CALTECH.EDU.UUCP Newsgroups: comp.os.vms Subject: Re: (Curiosity about holes killed the cat?) Message-ID: <870612111929.04g@CitHex.Caltech.Edu> Date: Fri, 12-Jun-87 14:23:10 EDT Article-I.D.: CitHex.870612111929.04g Posted: Fri Jun 12 14:23:10 1987 Date-Received: Sun, 14-Jun-87 18:38:39 EDT References: <870610070344.05g@Jpl-VLSI.ARPA> Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 32 > Just out of curiosity, anyone have a piece of FORTRAN code which shows how > to call the $GETUAI system service properly ? I can't get the thing to > return anything but nulls (or a bugcheck)... Well, I haven't programmed much in FORTRAN since system service calls started using item lists all over the place, so I don't have the appropriate FORTRAN code, but here's what you want in C: #include descrip #define UAI$_ACCOUNT 0x0000000B main() { extern long SYS$GETUAI(); long status; char account[64]; short result_length; $DESCRIPTOR (usrnam, "CARL"); struct ITMLST_3 { short buffer_length; short item_code; char *buffer_address; short *return_length_address; } itmlst[2] = {{64, UAI$_ACCOUNT, account, &result_length}, {0,0,0,0}}; if (((status = SYS$GETUAI(0,0,&usrnam,itmlst,0,0,0)) & 7) != 1) printf("Status = %%x%08X\n", status); else { account[result_length] = 0; printf ("Account = %s\n", account); } }