C   27/08/79 C9082901   MEMBER NAME  STWADD   (JADENS)      FORTRAN
      SUBROUTINE STWADD(IUNIT,*)
      IMPLICIT INTEGER*2 (H)
#include "cgraph.for"
#include "cdata.for"
      COMMON/CBSTR/MODE
      CALL BREAD(IUNIT,&1000,&1000)
      CALL CLOC(IND,'+BUF',IUNIT)
      IF(IND.GT.0) GO TO 3
      WRITE(JUSCRN,100)
  100 FORMAT(' STWADD FAILS TO FIND +BUF BANK. PROGRAMMED STOP.')
      STOP
    3 MODE=2
      IF(IDATA(IND).EQ.11) MODE=0
      IF(MODE.EQ.0) WRITE(JUSCRN,101)
      IF(MODE.EQ.2) WRITE(JUSCRN,102)
  101 FORMAT(' *** OUTPUT MODE IS BOS S. ***')
  102 FORMAT(' *** OUTPUT MODE IS BOS M. ***')
      REWIND IUNIT
      CALL BDLS(+BUF,IUNIT)
      NREC=0
    1 CONTINUE
      READ(IUNIT,ERR=1000,END=2000) IDUMMY
      NREC=NREC+1
      GO TO 1
 1000 CONTINUE
      RETURN 1
 2000 CONTINUE
      REWIND IUNIT
      IF(NREC.LT.1) RETURN
      DO 2 IREC=1,NREC
      READ(IUNIT,ERR=1000,END=1000) IDUMMY
    2 CONTINUE
      RETURN
      END
