      SUBROUTINE MATRIX (NUMBER)
C
C
C
C
C
      DIMENSION A(3,3)
      DO 1 I=1,3
      DO 1 J=1,3
1     A(I,J)=0.0
C
C
C
C     QUESTION HERE--WHAT IS MAX MAXTRIX ELEMENT VALUE
      FMAX=3.0
C     ?????????????????????????
C
C
C
C
      IOIN=5
      IOOUT=6
      IOFILE=20
C
C
      DO 5000 LOOP=1,NUMBER
C
C
      WRITE(IOOUT,101)LOOP
101   FORMAT(/' ***** CASE NUMBER ',I3)
1100  WRITE(IOOUT,100)
100   FORMAT(' PLEASE ENTER A MATRIX FOR LATTICE TRANSFORMATIONS')
      DO 2 I=1,3
      DO 22 J=1,3
99    WRITE(IOOUT,200) I,J
200   FORMAT(5X,'MATRIX ELEMENT (',I1,',',I1,')  = ',$)
      READ(IOIN,*,ERR=99,END=999) A(I,J)
      IF(ABS(A(I,J)).GT.5.0) GO TO 1100
C     WRITE(6,777) FMAX,A(I,J)
777   FORMAT(2F10.5)
      IF(ABS(A(I,J)).GT.FMAX) GO TO 99
22    CONTINUE
2     CONTINUE
      WRITE(IOFILE,124) ((A(I,J),J=1,3),I=1,3)
124   FORMAT(9F8.2)
5000  CONTINUE
C
C
C
      RETURN
999   STOP 'ABNORMAL END OF FILE'
      END
