	SUBROUTINE RENTRY	!RUN support for UCL
	INTEGER NB,LCW,NUSRS,UPTRS(6)
	LOGICAL*1 VIEW,PASSON,FLAG
	BYTE PRMPT(2),ID(34),STRING,COMAND,MASKR(41),USRSS(33),TRANSF
	BYTE FS1(10),FS2(15),FS3(4,2)
	COMMON /UCL01/ NB,STRING(81)
	COMMON /UCL02/ LCW,COMAND(81)
	COMMON /UCL04/ TRANSF(81,11),VIEW,PASSON
	EQUIVALENCE (COMAND(40),MASKR(1))
	DATA NUSRS /6/, UPTRS /1,8,13,18,23,29/, PRMPT /'*',"200/
	DATA USRSS  /'D','E','F','I','N','E',0,'E','X','I','T',0,
     #	 'L','I','S','T',0,'V','I','E','W',0,'C','H','A','I','N',0,
     #	 'H','E','L','P',0/
	DATA ID /'U','C','L','/','R','T','-','1','1',' ',' ','V','e',
     #	 'r','s','i','o','n',' ','2','.','0',' ',' ','J','u','n','e',
     #	 ' ','1','9','8','4',0/
	DATA FS1 /' ',' ','O','p','t','i','o','n',' ',0/
	DATA FS2 /' ','h','a','s',' ','b','e','e','n',' ','s','e','t',
     #	 ' ',0/, FS3 /'O','F','F',0,'O','N','',0/
   10	CALL GTLIN(STRING,PRMPT)
	NB = LEN(STRING)
	IF(NB .GT. 0)  GO TO 20
	CALL PRINT(ID)
	GO TO 10
C
C	Isolate first word of command line received
C
   20	COMAND(1) = 0
	LCW = INDEX(STRING,' ') - 1
	IF(LCW .LE. 0)  LCW = NB
	CALL SCOPY(STRING,COMAND,LCW)
C
C	Attempt to match command word with one of the list of recognized
C	User Service requests.  Allow abbreviations; trap ambiguous
C	command names.
C
	PT = 0
	DO 1000 I = 1,NUSRS
	CALL SCOPY(USRSS(UPTRS(I)),MASKR,LCW)
	IF(ISCOMP(COMAND,MASKR) .NE. 0)  GO TO 1000
	IF(PT .NE. 0)  CALL XITSTA('UCL','F','Ambiguous command')
	PT = I
 1000	CONTINUE
	IF(PT .EQ. 0)  CALL XITSTA('UCL','F','Unrecognized command')
C
C	Execute the User Service Request
C
	IF(PT .NE. 1)  GO TO 30
	CALL DEFINE
	GO TO 10
   30	IF(PT .NE. 2)  GO TO 40
	CALL XITSTA('UCL','I',)	!Success exit code
   40	IF(PT .NE. 3)  GO TO 50
	CALL LIST
	GO TO 10
   50	IF(PT .NE. 4)  GO TO 60
	VIEW = .NOT. VIEW       !Toggle flag value
	FLAG = VIEW
	GO TO 65
   60	IF(PT .NE. 5)  GO TO 70
	PASSON = .NOT. PASSON   !Toggle flag value
	FLAG = PASSON
   65	CALL SAVEC		!Preserve state of VIEW & PASSON flags
	CALL CONCAT(FS1,USRSS(UPTRS(PT)),STRING,80)
	CALL CONCAT(STRING,FS2,STRING,80)
	I = 1
	IF(FLAG)  I = 2
	CALL CONCAT(STRING,FS3(1,I),STRING,80)
	CALL PRINT(STRING)
	GO TO 10
   70	CALL HELP
	GO TO 10
	END
