Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ucla-cs!zen!ucbvax!CITHEX.CALTECH.EDU!carl From: carl@CITHEX.CALTECH.EDU (Carl J Lydick) Newsgroups: comp.os.vms Subject: Re: routine to convert UIC string to longword value Message-ID: <870822131622.03b@CitHex.Caltech.Edu> Date: Sat, 22-Aug-87 16:42:59 EDT Article-I.D.: CitHex.870822131622.03b Posted: Sat Aug 22 16:42:59 1987 Date-Received: Sun, 23-Aug-87 13:41:04 EDT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 29 > I recently needed to parse a UIC and convert it from a string > to a numeric value.. Being lazy I looked all over but couldn't find > a routine to do it for me, so I checked how it was done in the > SET command, and came up with this routine (translated from Bliss). > The calling sequence should be: > status = parse_uic(uic-text,uic-value) > > where uic-text is a string passed by descriptor, and uic-value is the > address of a longword to receive the UIC value. > > Hope this saves someone a little effort.. This might save those poor souls still running VMS V4.3 or earlier some trouble, but for those of us running at least VMS V4.4, its already been done (and better) by DEC. The calling sequence is: STATUS = SYS$ASCTOID(name, id, attrib) where name is the address of a string descriptor containing the uic text, id is the address of a longword to receive the numeric value, and attrib is the address of a longword mask to receive the attributes associated with the identifier. The value of the symbols KGB$V_DYNAMIC and KGB$V_RESOURCE are defined in $KGBDEF. $ASCTOID returns any of the following values: SS$_NORMAL normal completion SS$_ACCVIO bad address for one of the arguments SS$_INSFMEM to little process memory to open the rightslist SS$_IVIDENT name is in an invalid format SS$_NOSUCHID name is not in the right database RMS$_PRIV no read access to the rights database Specify id or attrib as 0, if you don't want the corresponding data.