C=======================================================================
	INTEGER FUNCTION USEROPEN(FAB,RAB,LUN)
C=======================================================================
C
C User file open routine -- releases unused allocated space when the 
C file is closed by setting a bit in the RMS file definitions
C
C=======================================================================
	INCLUDE '($FABDEF)'
	INCLUDE '($RABDEF)'
	INCLUDE '($SYSSRVNAM)'
	RECORD /FABDEF/ FAB
	RECORD /RABDEF/ RAB
C set the "truncate at end-of-file" bit to release the extra space
	FAB.FAB$L_FOP = FAB.FAB$L_FOP .or. FAB$M_TEF
	USEROPEN = sys$create(FAB)
	IF (.not. USEROPEN) RETURN
	USEROPEN = sys$connect(RAB)
	RETURN	 
	END

