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****************************************************************
	SUBROUTINE MACCH(ICM,IE)
	IMPLICIT LOGICAL*1 (A)
	IMPLICIT REAL*4    (C)
	IMPLICIT INTEGER*2 (D-Z)
	COMMON//SAVDES(256),CURVE1(512),CURVE2(512),ICS,ICB,ICOM
	COMMON/MAC/AMACRO
	IE=12
C*****COMMANDS TAKING A NAME PARAMETER
800	IF(NAMEMC(1,NL).LT.0)GOTO 1035
C*****        MC  ME  MP  MR  NE
	GOTO(810,820,830,840,850),ICOM-90
C*****MC..91
810	IF(MACCRE())1070,1035,10
C*****ME..92
820	IF(MACED())1070,1035,10
C*****MP..93
830	IF(MACPR())1070,1035,10
C*****MR..94
840	IF(MACRUN())1035,20,20
C*****NE..95
850	CALL CLOSEC(ICB)
	I=IFREEC(ICB)
	IF(AMACRO)CLOSE(UNIT=ICM)
	CALL CHFOR(NL)
C*****NO RETURN
	STOP 'ERROR'
10	IE=11
20	RETURN
1035	IE=3
	RETURN
1070	IE=8
	RETURN
	END
