.;
.;		THIS COMMAND FILE (LOGIN.CMD) ALLOWS A
.;		USER TO LOGIN ON A SINGLE ACCOUNT THEN
.;		TRANSFER TO OPTIONALLY EXAMINE THE UICS
.;		IN A GROUP AND TRANSFER TO THE DESIRED
.;		UIC.
.;
.;		WRITTEN BY MARVIN BROWN, N.C.A.R., JUNE 1980
.;
.;		THERE ARE FOUR RESPONCES.
.;			1)	"HELP" OR "?" TO PRINT
.;				THE LIST OF UICS IN THE
.;				GROUP.
.;			2)	A SINGLE NUMBER WHICH IS
.;				THE MEMBER NUMBER.
.;			3)	TWO NUMBERS SEPARATED BY
.;				A COMMA. THIS IS THE UIC.
.;			4)	A BLANK LINE TO REMAIN ON
.;				THE LOGIN UIC.
.;
.;		NOTE:	THE GROUP LIST IS POSSIBLE ONLY
.;			IF EACH UIC HAS A UIC.TXT FILE
.;			THAT HAS BEEN GENERATED BY THE
.;			COMMAND FILE MAKUICTXT.CMD AND
.;			THE UIC ['G','G'] EXISTS.
.;
.;		'G' IS THE GROUP NUMBER
.;		'P' IS TRUE IF THE LOGIN UIC IS [1,'G']
.;		    OR IF [1,'G'] IS ASSOCIATED WITH
.;		    THE GROUP.
.;		'HLPF' FLAGS IF A HELP HAS BEEN REQUESTED
.;		       IT THEN CAUSES A MASTER LIST TO BE
.;		       REGENERATED.
.;		'UIC' IS THE DESTINATION UIC
.;
	.SETN G 127
	.SETT P 1
.;
	.ENABLE SUBSTITUTION
	.ENABLE QUIET
	.SETF HLPF
.UIC:	.ASKS UIC ENTER UIC '<UIC>'
.;
.;		IF "HELP" OR "?" WERE TYPED, OUTPUT THE
.;		GROUP LIST AND START GENERATING A NEW ONE.
.;
	.SETS U UIC[1:1]
	.IF U <> "H"	.AND	.IF U <> "?"	.GOTO NOHLP
		.WAIT PIP
		PIP TI:=['G','G']UIC'G'.TXT
		.SETT HLPF
		.SETS PFILE ""
		.IFT P	.SETS PFILE "[1,'G']UIC.TXT,"
		.XQT PIP ['G','G']UIC'G'.TXT/FO='PFILE'['G',*]UIC.TXT
		.GOTO UIC
.;
.;		IF NOTHING WAS ENTERED, THIS IS THE PLACE.
.;
.NOHLP:	.TEST UIC
	.SETN UL <STRLEN>
	.IF UL = 0	.GOTO SUIC
.;
.;		LOOK FOR A COMMA. THIS MEANS A DIFFERENT GROUP
.;
	.SETN I 1
.LOOP:		.SETS T UIC['I':'I']
		.IF T = ","	.GOTO SUIC
		.INC I
		.IF I <= UL	.GOTO LOOP
.;
.;		NO COMMA, SO ADD THE GROUP.
.;
	.SETS UIC "'G'"+","+UIC
.;
.;		WAIT FOR THE GROUP LIST TO FINISH
.;		THEN SET THE UIC.
.;
.SUIC:	.IFT HLPF	.WAIT PIP
	.IFT HLPF	PIP ['G','G']UIC'G'.TXT/PU
	.IF UL <> 0	SET /UIC=['UIC']
	.DISABLE QUIET
	.IF UL <> 0	;	YOU ARE NOW AT ['UIC']
