.;
.; **********************************************************************
.; *									*
.; *				A L I A S . C M D			*
.; *									*
.; *				   WRITTEN BY				*
.; *									*
.; *			     ARNOLD SCOTT DE LARISCH			*
.; *									*
.; *				  VERSION 0.2				*
.; *									*
.; **********************************************************************
.;
.; The intent of this procedure is to allow a user to set up an alias
.; to use the facilities of DECNET without having to continually type
.; all the access control information on the screen.
.;
.; THIS VERSION REQUIRES MODIFICATIONS FURTHER IN THE FILE PLEASE
.; READ THE INTERNAL COMMENTS TO CONFIGURE THIS FILE FOR YOUR OWN
.; NETWORK!
.;

.enable decimal
.enable substitution
.ENABLE CONTROL-Z
.DISABLE LOWERCASE
.disable display
.enable quiet
	.SETF DCL				!PRETEND IT IS NOT DCL
	.IF <CLI> = "DCL" .SETT DCL		!IF IT IS DCL NOTE IT AND CHANGE
						!IT TO MCR ANYWAY.
	.IFT DCL SET /MCR			!LET THERE BE ONLY ONE CLI
	SET /SLAVE=TI:				!MAKE SURE THEY DO NOT CTRL-C
.open ti:
.10:
CLR
.DATA 
.DATA This procedure will allow you to set up an alias name for a remote
.DATA decnet node. You will be prompted for various information including
.DATA a valid user name and password on the remote system. Please note the
.DATA password will not be displayed at anytime during this procedure. The
.DATA alias definition will be erased at logout time.
.DATA
.DATA 
.DATA VALID NODE NAMES ARE:
.DATA
.;
.; PLEASE CHANGE THE FOLLOWING LINES TO ACCURATELY REFLECT NODES
.; IN YOUR OWN DECNET NETWORK. PLEASE CONTINUE READING IN THIS
.; FILE SINCE THERE IS ONE MORE LOCATION YOU MUST MODIFY.
.;
.DATA FAUVAX            Academic Computing VAX 11/780
.DATA FAUCAD            Mechanical Engineering VAX 11/750
.DATA FAUSPL            Electrical Engineering PDP 11/44
.DATA FAUCCS            Center for Complex Systems VAXlab
.DATA SERVAX            SERDAC VAX 8800 Cluster
.DATA FIUVH0            FIU Mechanical Engineering VAX 11/750
.DATA SCSVAX            FIU School for Computer Science VAX 11/750
.DATA
.SETF VALNOD					!SET VALID NODE FLAG FALSE
.ASKS NODNAM ENTER NAME OF REMOTE NODE >
.IFT <EOF> .GOTO BYEBYE
.;
.; PLEASE CHANGE THE FOLLOWING LINES TO ACCURATELY REFLECT YOUR
.; DECNET NETWORK. PLEASE NOTE THAT THERE SHOULD BE A LINE HERE
.; FOR EVERY NODE YOU DESCRIBED ABOVE. IF YOU TRUST YOUR USERS
.; YOU CAN DISPENSE WITH THE FORMAILTY OF VERIFYING A GOOD NODE
.; NAME BY UNCOMMENTING THE FOLLOWING COMMAND.
.;
.; .SETT VALNOD
.;
.; ANY NEW NODES ADDED TO THE NETWORK SHOULD BE INSERTED HERE!!
.;
.IF NODNAM = "FAUVAX" .SETT VALNOD		!IS IT THE VAX780?
.IF NODNAM = "FAUCAD" .SETT VALNOD		!IS IT THE VAX750?
.IF NODNAM = "FAUSPL" .SETT VALNOD		!IS IT THE PDP11/44?
.IF NODNAM = "FAUCCS" .SETT VALNOD		!IS IT THE uVAX II?
.IF NODNAM = "SERVAX" .SETT VALNOD		!IS IT THE VAX 8800?
.IF NODNAM = "FIUVH0" .SETT VALNOD		!IS IT FIU ME VAX 750?
.IF NODNAM = "SCSVAX" .SETT VALNOD		!IS IT FIU School for CS VAX?
.IFT VALNOD .GOTO 20				!THEY GOT THE NAME RIGHT, WOW!
.DATA 
.DATA ALIAS -- Not a valid node name ... Please try again.
.DELAY 5S					!LET THEM READ THE ERROR
.GOTO 10					!TRY IT AGAIN BOZO
.20:
.ASKS [::NODNAM] ALSNAM Enter the alias name to refer to the node  {default 'NODNAM'} >
.IFT <EOF> .GOTO BYEBYE				!DID THEY PRESS CTRL-Z
.30:
.ASKS USRNAM Enter username on node 'NODNAM' >
.IFT <EOF> .GOTO BYEBYE				!DID THEY PRESS CTRL-Z
.TEST USRNAM
.IF <STRLEN> > 16 .GOTO 35			!Username too long
.IF <STRLEN> > 0 .GOTO 40			!Username ok
.DATA 
.DATA ALIAS -- Error, Username must be entered ... Please try again
.DATA
.GOTO 30 					!Try it again L-User
.35:
.DATA 
.DATA ALIAS -- Error, Username may not exceed 16 characters
.DATA          Please try again
.DATA
.GOTO 30					!Try it again L-User
.40:
SET /NOECHO=TI:					!TURN OFF ECHO WHEN GETTING
						!THEIR PASSWORDS.
.ASKS PASWRD Enter password for username 'USRNAM' on node 'NODNAM' >
.IFT <EOF> .GOTO BYEBYE				!DID THEY PRESS CTRL-Z
.ASKS PASWD2 Reenter password for username 'USRNAM' on node 'NODNAM' >
.IFT <EOF> .GOTO BYEBYE				!DID THEY PRESS CTRL-Z
SET /ECHO=TI:					!TURN ON ECHO AGAIN
.IF PASWRD = PASWD2 .GOTO 45			!PASSWORD MATCH THEN CONT.
.ENABLE LOWERCASE
.DATA 
.DATA ALIAS -- Error, passwords do not match ... Try again
.DATA 
.DISABLE LOWERCASE
.DELAY 3S
.GOTO 40
.45:
.SETF TOOBIG
.SETF TOOSML
.TEST PASWRD
.IF <STRLEN> > 8 .SETT TOOBIG
.IF <STRLEN> < 1 .SETT TOOSML
.IFF  TOOBIG .AND .IFF TOOSML .GOTO 50
.DATA
.DATA ALIAS -- Error, passwords out of range 
.DATA          Decnet passwords must be from 1 to 8 characters
.DATA          Try again.
.DATA
.DELAY 3S
.GOTO 40
.50:
NCP SET ALIAS 'ALSNAM' DEST 'NODNAM'/'USRNAM'/'PASWRD'	!SET UP ALAIS
CLR							!CLEAR THE SCREEN
.ENABLE LOWERCASE					!LET LOWERCASE PROVAIL
.DATA 
.DATA Your alias has been set up as follows:
.DATA
NCP SHOW ALIAS 'ALSNAM'					!SHOW THE ALIAS
.DATA
.DATA You may now refer to your account 
.DATA 'USRNAM' on 'NODNAM' simply as 'ALSNAM'::
.BYEBYE:						!EXIT ROUTINE
SET /ECHO=TI:						!JUST INCASE ITS OFF
SET /NOSLAVE=TI:					!MAKE THEM USEFUL AGAIN
.IFT DCL SET /DCL=TI:					!RESET TO DEF CLI
.CLOSE							!CLOSE THE TERMINAL
.EXIT							!LEAVE THEM
