C
C
C
C     MENUW IS THE WATRAN VERSION OF MENU
C     MENUW OPENS THE BIN FILE FORMED BY MENUX
C     ON DISK 5
C
C     A,B CONTAINS THE 9 LETTER FILE NAME
C
C      ISET = -2  CLEARS THE DISPLAY
C      ISET = -1  INITIALIZES THE DISPLAY 
C      ISET =  0  SWITCHES ALL PAGES OFF
C      ISET =     THE PAGE TO BE DISPLAYED
C
C
C
      SUBROUTINE MENUW(A,B,ISET)
      REAL FNAME(2)
      COMMON/OIL/ IVECT(200)
      FNAME(1) = A
      FNAME(2) = B
C
C
      CALL OPEN(1,FNAME)
C
C
      IF(ISET .EQ. -1) CALL INIT(FNAME,&100)
C
C     READ EACH PAGE
C
      DO 10 IPAGE = 1,10
      READ(1) ISIZE
      IF(ISIZE .EQ. 0) RETURN
C
C
      I = 5
      IF(ISET .EQ. IPAGE) I = 4
      IF(ISET .EQ.   -2 ) I = 3
C
C
      DO 20 J = 1,ISIZE
      READ(1) ITAG
 20   CALL DISPLY(I,ITAG)
C
C
 10   CONTINUE
 100  RETURN
      END
C
C     SUBROUTINE INIT INITIALIZES THE
C          DISPLAY FOR MENUW
C
      SUBROUTINE INIT(FNAME,*)
C
C
      REAL FNAME(2)
      COMMON/OIL/ IVECT(200)
C
C
      CALL OPEN(1,FNAME)
C
C      FIND THE FIRST TAG
C
1     READ(1) ITAG
      IF(ITAG .NE. 0) GO TO 1
C
C      READ THE DATA
C
 2    READ(1) LENGTH,ITAG,(IVECT(K),K = 1,LENGTH)
      IF(ITAG .EQ. 0) RETURN1
      CALL DISPLY(1,ITAG,IVECT,1,LENGTH)
      GO TO 2
C
C
      END
