;	TRMNAM		Change terminal name.
;	Author:		Irwin M. Goldstein, London House Incorporated
;	Written on:	5/5/86

;	Usage:
;	=====
;		.TRMNAM newnam

;	Changes the name of the currently attached terminal to newnam.
;	Must be logged in OPR: to run.

	SEARCH	SYS
	SEARCH	SYSSYM

	PHDR	-1,0,PH$REE!PH$REU!PH$OPR

	JOBIDX	A1			; index out JCB
	MOV	JOBTRM(A1),A1		; index the terminal status word
	SUB	#4,A1			; name is 4 bytes behind
	PACK				; pack the name specified into
	PACK				;    the terminal definition block

	EXIT