C****************************************************************
C* 								*
C*								*
C*	DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY *
C*	EITHER FOR THE CREATION OR FOR THE CLINICAL EFFICACY	*
C*	OF THIS PROGRAM. USERS MUST ASSUME FULL RESPONSIBILITY	*
C*	FOR ANY RESULTS OR DIAGNOSES OBTAINED FROM THE USE	*
C*	OF THIS PROGRAM. QUESTIONS ON THE EXECUTION OF THIS	*
C*	PROGRAM MUST BE REFERRED BACK TO THE ORIGINAL AUTHOR.	*
C*								*
C* AUTHOR:	SALLY FORSTER					*
C*		C/O DEPARTMENT OF NUCLEAR MEDICINE		*
C*		GUY'S HOSPITAL				*
C*		LONDON, ENGLAND					*
C*								*
C*		TEL: 01-407-7600 EXT 2583/4			*
C*								*
C****************************************************************
	FUNCTION MACRUN()
C*****OPENS THE MACRO FILE ON UNIT ICM AND READS THE FIRST LINE INTO 
C*****COMMON/IN/ARRAY A
C*****RETURNS MACRUN=-1 IF A READ ERROR OCCURS OR NO FILE FOUND
C*****MACROS MAY BE RUN FROM OTHER MACROS
	IMPLICIT LOGICAL*1(A)
	IMPLICIT INTEGER*2(D-Z)
	COMMON/IN/NA,A(76),LP
	COMMON/MAC/AMACRO,AFLAG,ICM,ICN,ANAME(16),IREDNM(4)
	IF(AMACRO)CLOSE(UNIT=ICM)
	AMACRO=.FALSE.
	IF(LOOKUP(ICM,IREDNM).LT.0)GOTO 200
	CALL CLOSEC(ICM)
	OPEN(UNIT=ICM,NAME=ANAME,TYPE='OLD',ERR=150)
	MACRUN=0
	READ(ICM,210,END=140,ERR=140)NA,A
	LP=1
	AMACRO=.TRUE.
	RETURN
140	CLOSE(UNIT=ICM)
150	MACRUN=-1
C*****READ/WRITE ERROR
	RETURN
200	WRITE(7,205)
	MACRUN=0
	RETURN
205	FORMAT(1X,'FILE NOT FOUND')
210	FORMAT(I6,76A1)
	END
