.;
.; SLUDTRPRE.CMD
.;
.; EDIT NUMBER = 0000
.;
.;
.;
.; GLOBAL VARIABLES ARE:
.;	$ANS = TRUE OR FALSE
.;	$NAME = USERS NAME
.;	
.; CALLED SUBROUTINES ARE:
.;	LB:[20,25]SLUUICCK
.;	LB:[20,25]SLUCKNAM
.;	LB:[20,25]SLUEXTRL
.;
	.ENABLE QUIET
	.ENABLE SUBSTITUTION
	.ENABLE GLOBAL
	.DISABLE LOWERCASE
	SET /NOLOWER=TI:
	PIP DTRDAT.DAT;*/DE/NM
	.SETS S1 " "
	.SETS S2 "  "
	.SETS S3 "   "
	.SETS S4 "    "
	.SETS S5 "     "
	.SETS M1 "JAN"
	.SETS M2 "FEB"
	.SETS M3 "MAR"
	.SETS M4 "APR"
	.SETS M5 "MAY"
	.SETS M6 "JUN"
	.SETS M7 "JUL"
	.SETS M8 "AUG"
	.SETS M9 "SEP"
	.SETS M10 "OCT"
	.SETS M11 "NOV"
	.SETS M12 "DEC"
	.SETS $UIC <UIC>
.1:
	.ASKS $NAME YOUR LAST NAME
	.SETF $ANS
	@LB:[20,25]SLUCKNAM
	.IFT $ANS .GOTO 2
	.DISABLE QUIET
	; WRONG LAST NAME PLEASE TRY AGAIN
	.ENABLE QUIET
	.GOTO 1
.2:
	@LB:[20,25]SLUUICCK
	.IFT $ANS .GOTO 3
	.DISABLE QUIET
	; WRONG UIC / NAME COMBINATION TRY AGAIN OR
	; TYPE ^Z TO ABORT
	.ENABLE QUIET
	.GOTO 1
.3:
	.TEST $NAME
	.IF <STRLEN> GE 20. .GOTO 4
	.SETN AA 20.-<STRLEN>
	.IF AA LT 5 .GOTO 3A
	.SETS $NAME $NAME+S5
	.GOTO 3

.3A:	.SETN AA 20.-<STRLEN>
	.SETS $NAME $NAME+S'AA'
	.GOTO 3
.4:
	.TEST $NAME
	.IF <STRLEN> EQ 20. .GOTO 5
	.DISABLE QUIET
	; INTERNAL ERROR!! SEE AN EXPERT
	/
.5:
	.PARSE <UIC> "[,]" A GR ME A
.6:	.TEST GR
	.IF <STRLEN> GE 3 .GOTO 7
	.SETS GR "0"+GR
	.GOTO 6
.7:
	.TEST ME
	.IF <STRLEN> GE 3 .GOTO 8
	.SETS ME "0"+ME
	.GOTO 7
.8:
	.PARSE <DATE> "--" DY MO YR
	.SETN B 1
.9:
	.IF M'B' EQ MO .GOTO 10
	.INC B
	.IF B LT 13. .GOTO 9
.10:
	.SETS AMO "'B'"
	.TEST AMO
	.IF <STRLEN> EQ 2 .GOTO 11
	.SETS AMO "0"+AMO
.11:
	.OPEN DTRDAT.DAT
	.DATA 'GR''ME''$NAME''$SUBPJ''AMO''DY''YR'
	.CLOSE
	.DISABLE QUIET
	;
	; NOW WE RUN DTR.  YOU SHOULD FIRST TYPE ":SLIB"
	; AND THEN ":EXTRACT-MODULE" FOR EACH MODULE TO BE EXTRACTED
	;
	.ENABLE QUIET
	RUN $DTR/INC=31000
	@LB:[20,25]SLUEXTRL
	.DISABLE QUIET
	; 
	; DONE, MODULES EXTRACTED
	;
	.ASK A YOUR TERMINAL HAS BEEN SET TO UPPER CASE, DO YOU WANT LOWERCASE
	.IFT A SET /LOWER=TI:
