      SUBROUTINE QEINFL
     I                  (MESSFL,NUMRCH,METFLG,SCNAME,
     M                   DAT8,DAT8A)
C
C     + + + PURPOSE + + +
C     modify incremental flow data
C
C     + + + DUMMY ARGUMENTS + + +
      INTEGER   MESSFL,NUMRCH,METFLG
      REAL      DAT8(10,NUMRCH),DAT8A(8,NUMRCH)
      CHARACTER SCNAME*(*)
C
C     + + + ARGUMENT DEFINITIONS + + +
C     MESSFL - Fortran unit number for message file
C     NUMRCH - number of reaches
C     METFLG - flag indicating English or Metric units
C     SCNAME - screen name to appear in upper left corner
C     DAT8   - array of data for incremental flow-1
C     DAT8A  - array of data for incremental flow-2
C
C     + + + LOCAL VARIABLES + + +
      INTEGER   I,I1,SCLU,SGRP,RNUM,IVAL(1,200),CVAL(1,3,200),IPOS,IRET
C      INTEGER   I,I1,SCLU,SGRP,RNUM,IVAL(1,50),CVAL(1,3,50),IPOS,IRET
      CHARACTER*1 TBUFF(80,200),DASH
C      CHARACTER*1 TBUFF(80,50),DASH
C
C     + + + INTRINSICS + + +
      INTRINSIC   INDEX
C
C     + + + EXTERNALS + + +
      EXTERNAL    QRESCN, ZGTRET, ZWNSET
C
C     + + + END SPECIFICATIONS + + +
C
      I1  = 1
      SCLU= 10
      DASH= '-'
C
 10   CONTINUE
        CALL ZWNSET (SCNAME)
        RNUM= 10
        SGRP= 8+ METFLG
        CALL QRESCN (MESSFL,SCLU,SGRP,I1,RNUM,I1,NUMRCH,I1,
     M               IVAL,DAT8,CVAL,TBUFF)
C
C       get user exit command
        CALL ZGTRET (IRET)
        IF (IRET.EQ.1) THEN
C         user selected 'next', group data8a, form 15
          IPOS= INDEX (SCNAME,DASH)+ 1
          SCNAME(IPOS:IPOS)= '2'
          CALL ZWNSET (SCNAME)
          RNUM= 8
          SGRP= 10
          CALL QRESCN (MESSFL,SCLU,SGRP,I1,RNUM,I1,NUMRCH,I1,
     M                 IVAL,DAT8A,CVAL,TBUFF)
C         get user exit command
          CALL ZGTRET (IRET)
          IF (IRET.EQ.2) SCNAME(IPOS:IPOS)= '1'
        ELSE
C         reset exit command value
          IRET= 1
        END IF
      IF (IRET.EQ.2) GO TO 10
C
      RETURN
      END
