      SUBROUTINE QEDSBD
     I                  (MESSFL,METFLG,SCNAME,
     M                   DAT13,DAT13A)
C
C     + + + PURPOSE + + +
C     modify downstream boundary data
C
C     + + + DUMMY ARGUMENTS + + +
      INTEGER   MESSFL,METFLG
      REAL      DAT13(8),DAT13A(7)
      CHARACTER SCNAME*(*)
C
C     + + + ARGUMENT DEFINITIONS + + +
C     MESSFL - Fortran unit number for message file
C     METFLG - flag indicating English or Metric units
C     SCNAME - screen name to appear in upper left corner
C     DAT13  - array of data for downstream boundary-1
C     DAT13A - array of data for downstream boundary-2
C
C     + + + LOCAL VARIABLES + + +
      INTEGER     I,I1,SCLU,SGRP,IRET,IPOS,RNUM,IVAL(1),CVAL(1,3)
      CHARACTER*1 TBUFF(80),DASH
C
C     + + + INTRINSICS + + +
      INTRINSIC   INDEX
C
C     + + + EXTERNALS + + +
      EXTERNAL    QRESPM, ZGTRET, ZWNSET
C
C     + + + END SPECIFICATIONS + + +
C
      I1  = 1
      SCLU= 10
      DASH= '-'
C
 10   CONTINUE
C       loop back here if user selects 'prev' on 2nd screen
        CALL ZWNSET (SCNAME)
        RNUM= 8
        SGRP= 13+ METFLG
        CALL QRESPM (MESSFL,SCLU,SGRP,I1,RNUM,I1,
     M               IVAL,DAT13,CVAL,TBUFF)
C
C       get user exit command
        CALL ZGTRET (IRET)
        IF (IRET.EQ.1) THEN
C         user selected 'next', group data13a, form 22
          IPOS= INDEX(SCNAME,DASH)+ 1
          SCNAME(IPOS:IPOS)= '2'
          CALL ZWNSET (SCNAME)
          RNUM= 7
          SGRP= 15
          CALL QRESPM (MESSFL,SCLU,SGRP,I1,RNUM,I1,
     M                 IVAL,DAT13A,CVAL,TBUFF)
C         get user exit command
          CALL ZGTRET (IRET)
          IF (IRET.EQ.2) SCNAME(IPOS:IPOS)= '1'
        ELSE
C         reset user exit command value
          IRET= 1
        END IF
      IF (IRET.EQ.2) GO TO 10
C
      RETURN
      END
