	SUBROUTINE DEFINE
	INTEGER NB,LCW,NCMDS,CPTRS,I,PT
	LOGICAL*1 VIEW,PASSON
	BYTE STRING,COMAND,CMDS,TRANSF,SPACE,ZROALL(48)
	COMMON /UCL01/ NB,STRING(81)
	COMMON /UCL02/ LCW,COMAND(81)
	COMMON /UCL03/ NCMDS,CPTRS(11),CMDS(36)
	COMMON /UCL04/ TRANSF(81,11),VIEW,PASSON
	DATA ZROALL /"11,'U','n','d','e','f','i','n','e',' ','a','l',
     #	 'l',' ','U','C','L',' ','c','o','m','m','a','n','d',' ','t',
     #	 'r','a','n','s','l','a','t','i','o','n','s','?',' ','[','Y',
     #	 '/','N',']',' ',' ',"200/, SPACE /"40/

	I = LCW + 2		!Skip over "space" separator
	IF(I .GT. NB)  GO TO 50
	LCW = LEN(STRING(I))
	IF(LCW .EQ. 0)  GO TO 50
C
C	Command to be defined has been specified
C
	CALL SCOPY(STRING(I),COMAND,80)
	PT = MATCHC()
	IF(PT) 10,20,30
   10	CALL PRINT('?UCL-W-DEFINE-Ambiguous command')
	RETURN
   20	CALL PRINT('?UCL-W-DEFINE-Unrecognized command')
	RETURN
   30	CALL SCOPY('The new definition of UCL command "',STRING)
	CALL CONCAT(STRING,CMDS(CPTRS(PT)),STRING,80)
	CALL CONCAT(STRING,'" will be',STRING)
	CALL GTLIN(STRING,STRING)
	I = 1
	IF(PT .NE. 11)  GO TO 40	!MEDIT is a special case
	IF(LEN(STRING) .EQ. 0)  GO TO 40
	IF(STRING(1) .EQ. SPACE)  GO TO 40
	TRANSF(1,11) = SPACE
	I = 2
   40	CALL SCOPY(STRING,TRANSF(I,PT))
	GO TO 60
C
C	No Command specified:  Clear all definitions?
C
   50	CALL GTLIN(STRING,ZROALL)
	IF(STRING(1) .NE. 'Y')  RETURN
	DO 1000 I = 1,11
	TRANSF(1,I) = 0
 1000	CONTINUE
   60	CALL SAVEC		!Preserve new command definitions
	RETURN
	END
