C   28/05/82 504211226  MEMBER NAME  MUCHAN   (JADEMUS)     FORTRAN
C   27/05/82 205271455  MEMBER NAME  MUCHAN   (S)           FORTRAN
C   27/10/81 110271013  MEMBER NAME  MUCHAN   (JADEMUS1)    FORTRAN
C   12/06/81 110261518  MEMBER NAME  MUCHAN   (S)           FORTRAN
C
C LAST CHANGE 11.40 29/06/82 HUGH MCCANN  - ADD /CMUED/ .
C      CHANGE 10.00 28/05/82 HUGH MCCANN  - REDUCE CORE REQUIREMENTS FOR
C                                          PRODUCTION OF UPDATE DATASETS
C      CHANGE 10.15  27/10/81   HUGH MCCANN  -CORRECT HVDRFT BUG.
C
      SUBROUTINE MUCHAN(I)
      IMPLICIT INTEGER*2 (H)
C COMMONS.
#include "cmucalib.for"
#include "cmuedwrk.for"
#include "cmued.for"
      DIMENSION HPOINT(20)
      DATA HPOINT/  33,1415,1497,1579,1661,1743,1815,2541,1907,6981,
     *            3176,3810,4444,7615,8249,8255,8261,8267,8273,1907/
C
C*********************************************************************
C  THIS ROUTINE CHECKS WHETHER LOCATION NHMUCA HAS BEEN CHANGED BY
C  A PREVIOUS EDIT ( IN THE CURRENT SET ).
C  IF SO , LOCEDT IS SET TO THE LOCATION OF THE PREVIOUS CHANGED
C  VALUE IN HUPDAT.
C  THEN HUPDAT(LOCHAN) IS SET TO THE NEW VALUE OF HMUCAL(NHMUCA).
C
C  ONLY ACCEPT IALPH=6 (CTLO) OR IALPH=7 (CTHI) CHANGES IF ONE OR
C  MORE HALF-WORDS IN THE RANGE OF LOCATIONS 1907-2540 ( INC. )
C  HAVE CHANGED ( I.E. IF AND ONLY IF ONE OR MORE CTW'S HAVE CHANGED.)
C
      IF(IALPH.NE.6.AND.IALPH.NE.7)GO TO 20
      IF(NCHAN.EQ.0)RETURN
      DO 10 J=1,NCHAN
      IF(HLOC(J).GE.1907.AND.HLOC(J).LE.2540)GO TO 20
   10 CONTINUE
      RETURN
C
   20 NCHAN=NCHAN+1
      LOCHAN=NCHAN
      NHMUCA=HPOINT(IALPH)+I-1
      IF(I.EQ.99999)NHMUCA=3175
      IF(NCHAN.EQ.1)GO TO 3002
      DO 3001 J=1,8370
      IF(HLOC(J).NE.NHMUCA) GO TO 3001
      LOCHAN=J
      NCHAN=NCHAN-1
      GO TO 3002
 3001 CONTINUE
 3002 HUPDAT(LOCHAN)=HMUCAL(NHMUCA)
      HLOC(LOCHAN)=NHMUCA
      RETURN
      END
C
      BLOCK DATA
C
      IMPLICIT INTEGER*2 (H)
C
C
#include "cmued.for"
C
      DATA NCHAN/0/
      END
