C   07/06/96 606071836  MEMBER NAME  BSTA     (S4)          FORTG1
      SUBROUTINE BSTA
C     BOS SUBPROGRAM =1.17=
C   18/10/82            MEMBER NAME  ACS      (S)           FORTRAN
      COMMON/ACS/
     1   ICOND,NLAST,NDUMP,NSPL,NAMAX,NAMAX1,NLIST,NPRIM,NFRS,NLST,
     2   NEXT,NCI,NFRE,IN,KPOS,LIND,ILOW,LFDI,LFDK,NCPL,
     3   NHISTH(11),
     4        NCOL,NZT,IBFI,NLAST1,ISLST,IMLST,INAMV,IOLST,IPLST,
     5   NER(10),
     6   NRECL,NERRL,NRIN,NROUT,NS,NEXTI,NEXTA,NEXTB,ISAVB,NSAVB,
     7   NHISTL(11),
     8        MARKWR,NOUT(3),IASW,NPRE,IDUMMY(1),NEOTP,NDUMP1
      COMMON/BCS/IW(1)
      INTEGER IDES(10),IBLK/'    '/,IODS(3)/' -I ',' --O',' -IO'/
      NZTA=NZT-NTIME(DUMMY)
      MINT=NZTA/6000
      NZTA=NZTA-6000*MINT
      SEC=0.01*FLOAT(NZTA)
      NBS=NLAST/10
      WRITE(6,101) MINT,SEC,NCOL,NBS,NHISTH,NHISTL,NCPL
C
      IF(NHISTH(11).NE.0) CALL MSGTXT('BCS-     ')
      IF(NHISTH(11).NE.0) CALL MSGTXT('OVERFLOWS')
      IO=0
      IOE=0
      IOT=0
      CALL BPOS('+BUF')
   30 CALL BNXT(IND,*37)
      IF(IW(IND+1).LT.1.OR.IW(IND+1).GT.2) GOTO 30
      IF(IO.EQ.0) WRITE(6,102)
      IO=IW(IND+1)
      IF(IO.EQ.1) IOE=IOE+IW(IND+3)
      IOT=IOT+IW(IND+6)
      NERAL=IW(IND+9)
      ISAVW=IW(IND+7)
      FBYT=4.0E-6*FLOAT(IW(IND+7))
      IF(IW(IND+5).NE.0) IW(IND+7)=ISAVW/IW(IND+5)
      GOTO (32,34),IO
   32 WRITE(6,103) IW(IND-2),IW(IND+2),IW(IND+3),NERAL,
     1 (IW(IND+L),L=4,5),IW(IND+7),IW(IND+6),IW(IND+8),FBYT
      GOTO 36
   34 WRITE(6,104) IW(IND-2),IW(IND+2),IW(IND+3),(IW(IND+L),L=4,5),
     1   IW(IND+7),IW(IND+6),IW(IND+8),FBYT
   36 IW(IND+7)=ISAVW
      GOTO 30
   37 IOB=0
      DO 38 I=1,10
      IOB=IOB+NER(I)
   38 CONTINUE
      IF(IOB.NE.0) GOTO 39
      WRITE(6,107)
      GOTO 40
   39 WRITE(6,108) NER
      CALL MSGTXT('    INPUT')
      CALL MSGINT(IOB,1,3)
      CALL MSGTXT('BNKERRORS')
C
   40 IF(IOE.EQ.0) GOTO 41
      CALL MSGTXT('    READ-')
      CALL MSGINT(IOE,1,3)
      CALL MSGTXT('   ERRORS')
   41 IF(IOT.EQ.0) GOTO 43
      CALL MSGTXT('     EVTS')
      CALL MSGINT(IOT,1,4)
      CALL MSGTXT('TOO LARGE')
   43 WRITE(6,105) NCI
      IF(NCI.LE.0) GOTO 50
      DO 44 I=1,NCI,10
      IZ=MIN0(I+9,NCI)
      DO 42 L=I,IZ
      J=IW(IOLST+L)
      IDES(L-I+1)=IBLK
      IF(J.LT.1.OR.J.GT.3) GOTO 42
      IDES(L-I+1)=IODS(J)
   42 CONTINUE
      WRITE(6,106) (IW(INAMV+L),IDES(L-I+1),L=I,IZ)
   44 CONTINUE
      WRITE(6,106)
C
   50 CALL BPOS('+DIR')
   52 CALL BNXT(INDA,*60)
      IUND=IW(INDA-2)
      WRITE(6,109) IUND,IW(INDA+6),IW(INDA+7),(IW(INDA+J),J=21,35)
      GOTO 52
   60 CONTINUE
      CALL MSGPR
  100 RETURN
  101 FORMAT(/'0STATUS/BANK ORGANISATION PROGRAM',7X,I6,' MIN',
     1   F8.2,' SEC'/'0',I7,' COLLECTIONS',4X,'HISTOGRAM OF STORAGE ',
     2   'USED (BINS OF',I5,' WORDS)',53X,'OVERFLOWS'/
     3   9X,'TOTAL',2X,5I10,1X,5I10,I15/'  LOW PRIORITY  ',
     4   5I10,1X,5I10,I15/' (',I5,' WORDS)')
  102 FORMAT('0SUMMARY OF INPUT/OUTPUT'//20X,'RECORD',18X,
     1   'IO-ERRORS',6X,'RECORDS     EVENTS',2X,'MEAN  NR    EVENTS  MA'
     2   ,'X   NR'/' UNIT',15X,'LENGTH      MODE        NR   ALLOWED',
     3'   -------   ACCEPTED  OF WORDS TOO LARGE  OF WORDS    MBYTES')
  103 FORMAT(1X,I4,' INPUT',5X,I10,10X,3I10,1X,4I10,F10.3)
  104 FORMAT(1X,I4,' OUTPUT',4X,2I10,20X,I10,1X,4I10,F10.3)
  105 FORMAT('0ORDERED LIST OF ALL',I6,' NAMES USED'/)
  106 FORMAT(20X,5(2X,2A4),1X,5(2X,2A4))
  107 FORMAT('0NO INPUT-BANK ERRORS'/)
  108 FORMAT('0INPUT-BANK ERRORS'/15X,I10,'  RECORD LENGTH LT 4'/
     1   15X,I10,'  BANK LENGTH NEGATIVE'/15X,I10,'  BANK LENGTH',
     2   ' EXCEEDS RECORD LENGTH'/15X,I10,'  WRONG ORDER IN BANK',
     3   ' NUMBERS'/15X,I10,'  RECORD LENGTH CONTRADICTION'/
     4   15X,I10,'  SEGMENT ORDER IC=2, 1'/15X,I10,
     5   '  SEGMENT ORDER IC=1 OR 2, 0'/15X,I10,'  SEGMENT ORDER',
     6   ' IC=0, 2 OR 3'/15X,I10,'  SEGMENT CODE LT 0 OR GT 3'/
     7   15X,I10,'  READ BANK NAMES ALREADY PRESENT (OLD BANKS ARE',
     8   ' DELETED)')
  109 FORMAT('0---- DA-UNIT',I3,10X,'TOTAL',I6,' RECORDS, USED',
     1   I6,' RECORDS'/'0',38X,'LAST LOAD',17X,'LAST UPDATE',17X,
     2   'LAST UNLOAD'/15X,' DATE',10X,3(2A4,2X,2A4,10X)/
     3   15X,' STORED BANKS',12X,3(I8,20X)/)
      END
