C   07/06/96 606071858  MEMBER NAME  NEWOLD   (S4)          FORTRAN
      SUBROUTINE BLOCDA(IUNDA,IND,NAME,NR,*)
C
C     INTERFACE TO NEW ROUTINES
C
      COMMON/BCS/IW(1)
      COMMON/CCS/IUND,INDT,INDC,NPTR,INDA,LISTE(5),IPAS,NDAREC
C
C
C
      IND=ILINK(NAME,NR)
      IF(IND.NE.0) GOTO 100
      CALL BDFILE(IUNDA)
      IND=INDDIR(NAME,NR,IUNDA,2HFE)
      IF(IND.EQ.0) GOTO 200
      GOTO 100
C
C
C
      ENTRY BDLSDA(IUNDA,NAME,NR)
      CALL BDFILE(IUNDA)
      IND=INDDIR(NAME,NR,IUNDA,2HDL)
      GOTO 100
C
C
C
      ENTRY BCREDA(IUNDA,INDAR)
      CALL BDFILE(IUNDA)
      IND=INDDIR(IW(INDAR-3),IW(INDAR-2),IUNDA,2HST)
      GOTO 100
C
C
C
      ENTRY BCHKDA(IUNDA,NAME,NR,NWD)
      CALL BDFILE(IUNDA)
      IUND=IUNDA
      LISTE(1)=NAME
      LISTE(2)=NR
      CALL DIDA(1,LISTE,1)
      NWD=0
      IF(INDT.EQ.0) GOTO 100
      NWD=LISTE(4)
C
C
C
  100 RETURN
C
C
C
  200 RETURN 1
      END
      SUBROUTINE BINLDA(IUNDA,NREC,IPASS)
      CALL BDFILE(IUNDA)
      CALL BCFILE(IUNDA,NREC,1610,IPASS,3HNEW)
  100 RETURN
      END
      SUBROUTINE BDFILE(IUNDA)
      INTEGER NUN(5)/5*0/
      IF(IUNDA.LT.16.OR.IUNDA.GT.20) GOTO 101
      NU=IUNDA-15
      IF(NUN(NU).EQ.1) GOTO 100
      NUN(NU)=1
      GOTO (10,20,30,40,50),NU
   10 CONTINUE
      DEFINE FILE 16(2000,1610,U,IVAR)
      GOTO 100
   20 CONTINUE
      DEFINE FILE 17(2000,1610,U,IVAR)
      GOTO 100
   30 CONTINUE
      DEFINE FILE 18(2000,1610,U,IVAR)
      GOTO 100
   40 CONTINUE
      DEFINE FILE 19(2000,1610,U,IVAR)
      GOTO 100
   50 CONTINUE
      DEFINE FILE 20(2000,1610,U,IVAR)
  100 RETURN
C
C     UNIT FOR DIRECT ACCESS OUT OF RANGE 16 ... 20
C
  101 CALL BDMPA(111)
      GOTO 100
      END
      SUBROUTINE BUNLDA(IUNDA,IUNTP,NREC,NPAG,IPASS)
      CALL BDFILE(IUNDA)
      CALL BFTDIR(IUNDA,IUNTP,2HTO)
  100 RETURN
      END
      SUBROUTINE BLOADA(IUNDA,IUNTP,IPASS)
      CALL BDFILE(IUNDA)
C
C     SECOND ARGUMENT = -1610 TO SIGNAL 'OLD DATA SET' TO BCFILE
C     NREC IS TAKEN FROM DIRECTORY
C
      CALL BCFILE(IUNDA,-1610,1610,IPASS,'OLD')
      CALL BFTDIR(IUNDA,IUNTP,2HFR)
  100 RETURN
      END
      SUBROUTINE BPASDA(IUNDA,IPASS)
      CALL BDFILE(IUNDA)
      CALL BPWDIR(IUNDA,IPASS)
  100 RETURN
      END
