	SUBROUTINE GET_USERNAME (USER)
	CHARACTER*(*) USER
	CHARACTER*12 USERNAME
C**********************************************************************
C***
C***	THIS SUBROUTINE GETS THE USERNAME OF THE CURRENT PROCESS
C***
C***	PARAMETER :
C***		USER	(C*?)	RETURNED USERNAME. MINIMUM SIZE OF
C***				 PARAMETER IS 12 CHARACTERS.
C***
C**********************************************************************
C*MCT
	INCLUDE '($JPIDEF)'
	INTEGER*4 SYS$GETJPIW
	INTEGER*4 ITMLST (3)
	INTEGER*2 ITLST (2)
	EQUIVALENCE (ITMLST,ITLST)
C
	ITLST(1) = 12		! USER NAME BUFFER IS 12 BYTES
	ITLST(2) = JPI$_USERNAME
	ITMLST (2) = %LOC (USERNAME)
	ITMLST (3) = %LOC (SIZE)
C
	ISTAT = SYS$GETJPIW (,,,ITMLST,,,)
	IF (.NOT. ISTAT) CALL SYS_SIGNAL (ISTAT)
C
	USER = USERNAME
C
	RETURN
	END
