C   07/06/96 606071818  MEMBER NAME  BINLDA   (S4)          FORTG1
      SUBROUTINE BINLDA(IUNDA,NREC,IPASS)
C     BOS SUBPROGRAM   =4.2=
      COMMON/BCS/IW(1)
#include "ccs.for"
      INTEGER DIRA/'+DIR'/
      REAL*8 DATE(2)
      EXTERNAL RDDA
      WRITE(6,101) IUNDA,NREC
      CALL BDLS('+DIR',IUNDA)
      CALL BCRE(INDA,'+DIR',IUNDA,52,&100,IER)
      IUND=IUNDA
      NPRIME=NREC/20
      IF(NPRIME.LE.3) NPRIME=3
      NPRIME=NPRIME-2
   10 NPRIME=NPRIME+2
      A=NPRIME
      J=SQRT(A)
      DO 20 K=3,J,2
      NDIV=NPRIME/K
      IF(NDIV*K.EQ.NPRIME) GOTO 10
   20 CONTINUE
      IW(INDA+1)=49
      IW(INDA+2)=DIRA
      IW(INDA+3)=0
      IW(INDA+4)=0
      IW(INDA+5)=45
      IW(INDA+6)=NREC
      IW(INDA+7)=NPRIME+2
      IW(INDA+8)=NPRIME
      IW(INDA+19)=IPASS
      CALL DAY(DATE(1),DATE(2))
      CALL UCOPY(DATE,IW(INDA+21),4)
      CALL UCOPY(DATE,IW(INDA+25),4)
      CALL UCOPY(DATE,IW(INDA+29),4)
      CALL WRDA(1,IW(INDA+1),IW(INDA+2))
      CALL BDLS('+DIR',IUNDA)
      CALL BLOADA(IUNDA,0,IPASS)
      WRITE(6,102)
  100 RETURN
  101 FORMAT('0---- BINLDA    START FOR DA-DATASET',I3,
     1   ' WITH SPACE FOR',I6,' RECORDS')
  102 FORMAT('0---- BINLDA    END')
      END
