From:	SMTP%"dwing@uh01.colorado.edu"  7-AUG-1993 11:55:38.37
To:	EVERHART
CC:	
Subj:	RE: DCL - get next UIC member # routine

X-Newsgroups: comp.os.vms
Subject: RE: DCL - get next UIC member # routine
Message-Id: <1993Aug4.150308.27488@colorado.edu>
From: dwing@uh01.colorado.edu (Dan Wing)
Date: Wed, 4 Aug 1993 15:03:08 GMT
Reply-To: dwing@uh01.colorado.edu
Sender: news@colorado.edu (The Daily Planet)
Organization: University of Colorado Hospital Authority, Denver
Nntp-Posting-Host: buckie.hsc.colorado.edu
Lines: 28
To: Info-VAX@kl.sri.com
X-Gateway-Source-Info: USENET

In article <930803140733.20200136@GC1.GEORCOLL.ON.CA>, 
RBAKER@GC1.GEORCOLL.ON.CA writes:

>Hey, if anyone does have that routine, could you post it on the listserv.  I
>could use it to.

I haqued this out of the .COM file we use.  It relies on a valid alpha 
identifier being created for each UIC (which is usually done when you 
add a user).

  $  GENERATE_UIC = F$IDENTIFIER("some_username","NAME_TO_NUMBER")
  $  GROUP_NAME = "alpha_group_name"
  $
  $! UIC generate routine:
  $
  $_GEN_UIC_LOOP:
  $  ALPHA_UIC = F$FAO("!%I",GENERATE_UIC)
  $  WRITE SYS$OUTPUT "Checking UIC ", ALPHA_UIC
  $  IF F$LOCATE(GROUP_NAME,ALPHA_UIC) .EQ. F$LENGTH(ALPHA_UIC) THEN -
       GOTO _FOUND_UIC
  $  GENERATE_UIC = GENERATE_UIC + 1
  $  GOTO _GEN_UIC_LOOP
  $
  $_FOUND_UIC:
  $  WRITE SYS$OUTPUT "Found an unused UIC: ", ALPHA_UIC

-Dan Wing, Systems Administrator, University Hospital, Denver
 dwing@uh01.colorado.edu or wing_d@ucolmcc.bitnet

