   INTEGER FUNCTION VAL(WORD)

!     RETURNS THE 'VALUE' OF A WORD, MODULO 1000.

      INTEGER WORD

      VAL=MOD(WORD,1000)
      END