      SUBROUTINE IBMI4(INPUT,OUTPUT,N)
C
C *** ROUTINE CONVERTS INTEGER*4 FROM IBM TO VAX FORMAT
C *** IRT : JUNE 12,1979
C
      INTEGER*4 INPUT(N),OUTPUT(N),WORD
      LOGICAL*1 BYTE(4),TEMP
      EQUIVALENCE (BYTE,WORD)
C
      DO 10 I=1,N
      WORD=INPUT(I)
C *** INTERCHANGE OUTER PAIR OF BYTES
      TEMP=BYTE(1)
      BYTE(1)=BYTE(4)
      BYTE(4)=TEMP
C *** INTERCHANGE INNER PAIR OF BYTES
      TEMP=BYTE(3)
      BYTE(3)=BYTE(2)
      BYTE(2)=TEMP
C *** SET OUTPUT VALUE
      OUTPUT(I)=WORD
10    CONTINUE
      RETURN
      END
