C   07/06/96 606071854  MEMBER NAME  LSBCOM   (S4)          FORTG1
      SUBROUTINE LSBCOM
C
C     EXAMPLE FOR INPUT AND OUTPUT OF LSB-RECORDS
C
C
C
           COMMON/BCS/IW(10000)
C          CALL BINT(10000,4000,500,0)
C     C
C     C    INPUT OF ONE EVENT
C     C
           NREC=0
           CALL BRDO(1,1610,10)
C10        IF(IUHR(5).EQ.2) GOTO 50
  10       CALL BRDS(1,NBUFL,INIR)
           IF(INIR.EQ.0) GOTO 20
           CALL BFRD(1,IW(INIR),IW(INIR+1))
           IF(IW(INIR).LT.0) GOTO 50
           NREC=NREC+1
           GOTO 10
 20        CONTINUE
C     C
C     C    ANALYSE EVENT
C     C
C          CALL PRIBLO(2)
C     C
C     C    WRITE ONE EVENT
C     C
C          CALL BSLW
C       30 CALL LSBOUT(NTOT,INIW,&40)
C          CALL FWRT(2,NTOT,IW(INIW))
C          GOTO 30
C       40 CONTINUE
C    C
C    C     DELETE BANKS FROM LAST EVENT
C    C
           CALL BDLG(IGA)
C          CALL BSLT
C          CALL BDLM
C          CALL BGAR(IGA)
           GOTO 10
C    C
C    C     WRITE BUFFER
C    C
 50        CALL BMLT(0,BLA)
C          CALL LSBOUT(NTOT,INIW,&60)
C          CALL FWRT(2,NTOT,IW(INIW))
C       60 CONTINUE
C    C
C    C     FINAL STATISTIC AND END
C    C
C          CALL BSTA
C      100 CONTINUE
C          STOP
C          END
      WRITE(6,101) NREC
      RETURN
  101 FORMAT(1X,I8,' RECORDS INPUT'/)
      END
