      SUBROUTINE GETREP(FIELD,NREP,FLD)
C
C     SUBROUTINE TO SAY HOW MANY REPITITIONS OF A FIELD ARE SPECIFIED
C
      CHARACTER FIELD*10,FLD*10,CHARS(5)*1, HFIELD*10
      DATA CHARS/'A','I','F','E','G'/,NC/5/
C
      CALL MOVESTR ( FIELD, 1,  HFIELD, IC)
      IF(INDEX(HFIELD,'X').NE.0)THEN
           NREP=1
           FLD=FIELD
      ELSE
           I1=0
           DO I=1,NC
                J=INDEX(HFIELD,CHARS(I))
                IF(J.GT.0)I1=J
           ENDDO
           IF(I1.EQ.0)THEN
                NREP=-1
           ELSE IF (I1.EQ.1)THEN
                NREP=1
                READ(HFIELD,100,ERR=999)FLD
           ELSE
                READ(HFIELD(1:I1-1),*,ERR=999)NREP
                READ(HFIELD(I1:10),100,ERR=999)FLD
  100           FORMAT(A)
           ENDIF
      ENDIF
      RETURN
C
C     ERROR RETURN
C
  999 NREP=-1
      RETURN
C
      END
