Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!ucla-cs!zen!ucbvax!FHCRCVAX.BITNET!JOE From: JOE@FHCRCVAX.BITNET (Joe Meadows) Newsgroups: comp.os.vms Subject: routine to convert UIC string to longword value Message-ID: <8708221006.AA24253@ucbvax.Berkeley.EDU> Date: Sat, 22-Aug-87 03:38:00 EDT Article-I.D.: ucbvax.8708221006.AA24253 Posted: Sat Aug 22 03:38:00 1987 Date-Received: Sun, 23-Aug-87 11:37:40 EDT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 59 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.. Cheers, Joe Meadows Jr. Fred Hutchinson Cancer Research Center bitnet - JOE@FHCRCVAX arpa - JOE%FHCRCVAX.BITNET@WISCVM.WISC.EDU voice - (206) 467-4970 ;--------------------------------------------- .title parse_uic ;--------------------------------------------- $tpadef tparse_init: .long tpa$k_count0 .long tpa$m_blanks!tpa$m_abbrev tparse: .blkb tpa$k_length0 $init_state uic_stb,uic_ktb $state $tran tpa$_ident,,,,uic $state $tran tpa$_eos,tpa$_exit $end_state uic: .long .entry parse_uic,^m ; initialize tparse block movc5 #8,tparse_init,#0,#tpa$k_length0,tparse ; set the tparse block string info movl 4(ap),r0 movzwl (r0),tparse+tpa$l_stringcnt movl 4(r0),tparse+tpa$l_stringptr ; call lib$tparse pushab uic_ktb pushab uic_stb pushab tparse calls #3,g^lib$tparse movl uic,@8(ap) ret .end