      subroutine datjsum(np1,x,xj) ! bernd berg, nov 6 2008.
c as dajcak.f: calculation of  n  jackknife bins  xj(n)  for
c n  data in  x(n). returns average over all data in xj(np1).
      include '../../libs/fortran/implicit.sta'
      include '../../libs/fortran/constants.par'
      dimension x(np1-1),xj(np1)
      n=np1-1
      xsum=zero
      do i=1,n
        xsum=xsum+x(i)
      enddo 
      factor=one/(n-1)
      do i=1,n
        xj(i)=factor*(xsum-x(i))
      enddo
      xj(np1)=xsum/n
      return
      end
