Richard Hammersley wrote: > > I'm looking for an example of a program that finds > the next unused available uic in a specified uic group. > The following code fragment contains what you want. I pulled it from our "adduser" program. I don't know if this code came from an existing program or if we wrote it ourselves long ago. Good luck. -------------------------------------------------------------- Rick Johnson | The Aerospace Corporation | "I thought, therefore I was" email: johnson@halley.aero.org | phone: (310)336-3588 | - Descartes...now -------------------------------------------------------------- $! The following will ask the user to input a group number. The program will $! print out accounts in that group, report the first available UIC, and allow $! the user to input the uic desired. $! $uaf = "$authorize" $inquire grp "UIC Group Number" $if grp .eqs. "" then grp = "*" $write sys$output "" $write sys$output "Determine the UIC from the following listing:" $write sys$output "" $on warning then continue $uaf show ['grp',*]/brief $on warning then goto cleanup $write sys$output "" $! $ grpnum = f$integer("%O''grp'") $ mem=0 $ getuic: $ mem=mem+1 $ nextuic=%X10000*grpnum+mem $ if f$identifier(nextuic,"NUMBER_TO_NAME") .nes. "" then goto getuic $ uicstr = f$fao("!%U", nextuic) $! $inquire uic "Enter full UIC in octal (DEFAULT:''uicstr'): " $if uic .eqs. "" then uic="''uicstr'" $if f$locate("[",uic) .eq. f$length(uic) .and. - f$locate("<",uic) .eq. f$length(uic) then uic = "["+uic+"]"