	SUBROUTINE DEFLOGNAM (LOGNAM,EQUIVNAM)
	CHARACTER *(*) LOGNAM
	CHARACTER *(*) EQUIVNAM
C**************************************************************************
C***
C***	THIS SUBROUTINE WILL DEFINE A LOGICAL NAME IN THE CALLING USER'S
C***	PROCESS LOGICAL NAME TABLE. The logical name will only be valid
C***	for the durration of the image execution.
C***
C***	PARAMETERS :
C***
C***		LOGNAM		(C*?) LOGICAL NAME TO BE DEFINED
C***
C***		EQUIVNAM	(C*?) EQUIVALENCE NAME
C***
C**************************************************************************
C*MCT
C
	INCLUDE '($LNMDEF)'
	INTEGER*4 RETLEN
	INTEGER*4 SYS$CRELNM
	CHARACTER*(*) PROCESS_TABLE
	PARAMETER (PROCESS_TABLE = 'LNM$PROCESS_TABLE')
C
	INTEGER*2 ITMLST2 (2)
	INTEGER*4 ITMLST4 (4)
	EQUIVALENCE (ITMLST2,ITMLST4)
C
C***	GET LENGTHS
	LL = LENGTH (LOGNAM)
	LE = LENGTH (EQUIVNAM)
C
C***	BUILD THE ITEM LIST
	ITMLST2 (1) = LE		! BUFFER LENGTH
	ITMLST2 (2) = LNM$_STRING	! STRING LOGICAL NAME
	ITMLST4 (2) = %LOC (EQUIVNAM)	! ADDRESS OF EQUIVALENCE NAME
	ITMLST4 (3) = %LOC (RETLEN)	! ADDRESS OF RETURN LENGTH
	ITMLST4 (4) = 0			! END OF ITEM LIST MARKER
C
C***	NOW DO THE LOGICAL NAME
	ISTAT = SYS$CRELNM (,PROCESS_TABLE,LOGNAM,,ITMLST4)
	IF (.NOT. ISTAT) CALL SYS_SIGNAL (ISTAT)
C
	RETURN
	END
