From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 13-NOV-1989 17:22
To:	MRGATE::"ARISIA::EVERHART"
Subj:	SYSALF Autologin control 2/2

Message-Id:  <8911132114.AA06359@crdgw1.ge.com>
Received: From NSFNET-RELAY.AC.UK by CRVAX.SRI.COM with TCP; Mon, 13 NOV 89 04:00:44 PDT
Received: from sun.nsfnet-relay.ac.uk by vax.NSFnet-Relay.AC.UK 
           via Janet with NIFTP  id aa01071; 13 Nov 89 9:19 GMT
Date:           Mon, 13 Nov 89   9:24 BST
From: Nick de Smith <"PSI%JANET.000000000040::NICK%ncdlab.ulcc.ac.uk"@NSFnet-Relay.AC.UK>
To: INFO-VAX <@NSFnet-Relay.AC.UK:INFO-VAX@crvax.sri.com>
Subject:        SYSALF Autologin control 2/2

-+-+-+-+-+-+-+-+ START OF PART 2 -+-+-+-+-+-+-+-+
Vser name
X$`009User_Name := 'User_Name`009`009`009`009`009`009! Clean up user name
X$`009If User_Name .eqs. "?"
X$`009Then`009Type /NoPage SYS$INPUT
X
XAt the "Username" prompt:
X
X`009a) Enter a valid user name to list entries for that user.
X
X`009b) Enter a blank name to list all entries.
X
X$`009`009Goto DO_LIST
X$`009EndIf
X$`009If User_Name .nes. ""`009`009`009`009`009`009! Full list required
X$`009Then`009By_User = TRUE`009`009`009`009`009`009! Say full list wanted
X$`009`009Key = "/Index=1/Key=&User_Name"`009`009`009`009! ...and use the cor
Vrect keys
X$`009Else`009By_User = FALSE`009`009`009`009`009`009! List all ports wanted
X$`009`009Key = "/Index=0"`009`009`009`009`009! So use key 0 (access port nam
Ve)
X$`009EndIf
X$!
X$`009Counter = 0`009`009`009`009`009`009`009! Number of lines found
X$`009Close ALF_FILE`009`009`009`009`009`009`009! "rewind"" file
X$`009Open /Share=Read /Read /Write ALF_FILE &Sysalf`009`009`009! Allow read
V access
X$`009Read 'Key /Error=LIST_END ALF_FILE Record`009`009`009! Set the index to
V use and read first record
X$ LIST_LOOP:
X$`009AccP := 'F$Extract( P_0, L_0, Record )`009`009`009`009! Get access port
V name
X$`009User := 'F$Extract( P_1, L_1, Record )`009`009`009`009! Get old name
X$`009If By_User .and. (User_Name .nes. User) Then Goto LIST_END`009! Check f
Vor change in user name
X$`009If Counter .eq. 0 Then Say F$Fao( "!/  Access Port
V                                                      User!/" )
X$`009Counter = Counter + 1`009`009`009`009`009`009! Number of ports controll
Ved
X$`009Say F$Fao( "  !64AS !AS", AccP, User )`009`009`009`009! List it
X$`009Read /End_Of_File=LIST_END ALF_FILE Record`009`009`009! Get the control
V record
X$`009Goto LIST_LOOP`009`009`009`009`009`009`009! Round until end
X$!
X$ LIST_END:
X$`009If By_User
X$`009Then`009Say F$Fao( "!/!AS!UL access port!%S currently assigned to user
V !AS", Info, Counter, User_Name )
X$`009Else`009Say F$Fao( "!/!AS!UL access port!%S currently in list", Info, C
Vounter )
X$`009EndIf
X$`009Goto GET_ACCESS_PORT_NAME`009`009`009`009`009!`032
X$!
X$ FDL_ERROR:
X$`009Say Fatal, F$Fao( "Failed to create ""!AS""!/!AS", Temp_File, F$Message
V( $STATUS ) )
X$`009Goto END
X$!
X$ OPEN_FAILED:
X$`009Say Fatal, F$Fao( "Failed to open ""!AS""!/!AS", Sysalf, F$Message( $ST
VATUS ) )
X$`009Goto END
X$!
X$ CNTRL_Y:
X$`009Say Fatal, "User aborted procedure"
X$`009Goto END
X$!
X$!`009End of run
X$!
X$ END:`009Close /Error=10$ ALF_FILE`009`009`009`009`009! Shut the ALF
X$10$:`009Setv = F$Verify( Setv )`009`009`009`009`009`009! End this DCL
$ CALL UNPACK SYSALF.COM;1 1948984199
$ v=f$verify(v)
$ EXIT

