.ENABLE SUBSTITUTION
.ENABLE QUIET
.DISABLE DISPLAY
.; SET CLI SWITCH FOR MULTI CLI
CLI /UNOVR
.; GET LOGIN DEVICE
.SETS DEV <LOGDEV>
.TEST DEV
.SETN NDEV <STRLEN>
.SETS XDEV DEV[1:2]
.IF NDEV EQ 3 .SETS XDEV XDEV+"0"
.SETS XDEV XDEV+DEV['NDEV':'NDEV']+":"
.; GET TERMINAL NUMBER
.TESTFILE TI:
.SETS X <FILSPC>
.SETN NT 4
.SETS X1 X[4:4]
.IF X1 EQ ":" .SETN NT 3
.SETS TT X[3:'NT']
.; GET UIC
.SETS INUIC <LOGUIC>
.PARSE INUIC "[,]" NULL GRP MEM
; 'GRP' 'MEM'
; CHECK ACCOUNT BLOCK SIZES AND LOG IN
.SETN GROUP 'GRP'
.; SET PRIVILIGE
.IF GROUP NE 5 SET /NOPRIV=TI:
.SETN MAX 3000.
.IF GROUP EQ 5 .SETN MAX 10000.
.IF INUIC EQ "[350,47]" .SETN MAX 9000. 
.IF INUIC EQ "[5,5]" .SETN MAX 32000.
.IFNINS KBL SET /NOSLAVE=TI:
.IFNINS KBL .GOTO NOKBL
.XQT KBL 'XDEV',2,'<UIC>','MAX','TT'/LI
.WAIT KBL
.NOKBL:
.IFINS ...MSG MSG ME
.TESTFILE LOGIN.CMD
.IF <FILERR> NE 1 .EXIT
@LOGIN
