From: "Richard L. Johnson" <JOHNSON@halley.aero.org>
To: Richard Hammersley <hammersley@dartmouth.edu>
Subject: Re: Next unused UIC program
Date: 1997/01/02 [thread overview]
Message-ID: <32CB6D9F.163A7E31@halley.aero.org> (raw)
In-Reply-To: 32C98B92.5723@dartmouth.edu
[-- Attachment #1: Type: text/plain, Size: 1641 bytes --]
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+"]"
[-- Attachment #2: NEXTUIC.COM.3 --]
[-- Type: text/plain, Size: 952 bytes --]
$! 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+"]"
prev parent reply other threads:[~1997-01-02 5:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-12-31 5:00 Next unused UIC program Richard Hammersley
1997-01-02 5:00 ` Hein RMS van den Heuvel
1997-01-02 5:00 ` Richard L. Johnson [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox