      subroutine finijcl
      use module
      use mod_script
      use mod_licost
      use mod_tijkl
      IMPLICIT REAL(8)(A-H,O-X,Z),logical(1)(y)
      double precision,allocatable,dimension(:) :: h8
      double precision,allocatable,dimension(:,:) :: hmonot
      yw=.false.
      ii=sum(num1(isym(:)+1))
      allocate(h8(ii))
      if(ycl) then
         rewind 24
         !allocate(hmono(norb,norb))
         rewind 26
         
         !call lis(-21,hmono,'TOTAL',norb)
         !if(yw)print*,'hmono'
         !if(yw)call mscript(hmono)
         !ii=0
         ifin=0
         !do is=1,nsym
            !call mscript(hmono(ii+1:ii+isym(is),ii+1:ii+isym(is)))
            !ii=ii+isym(is)
         !enddo
         ii=0
         do is=1,nsym
            if(isym(is)==0) cycle
            read(26) h8(1:num1(isym(is)+1))
            if(yw)print*,'h8 sym',is
            if(yw)print'(5f12.8)', h8(1:num1(isym(is)+1))
            jj=0
            do k=1,isym(is)
               do l=1,k
                  jj=jj+1
                  write(73,'(4i4,d20.12)')
     *            insinv(k+ii),insinv(l+ii),0,0,h8(jj)
!        *         insinv(k+ii),insinv(l+ii),0,0,hmono( k+ii,l+ii)
               enddo
            enddo
            ii=ii+isym(is)
         enddo
         write(73,'(4i4,d20.12)') 0,0,0,0,enuc
      else
!
! write Hmono to file Mono
!
         rewind 26
         allocate(hmonot(norb,norb))
         ifin=0
         hmonot=0.d0
         do is=1,nsym
            if(isym(is)==0) cycle
            ideb=ifin+1
            ifin=ifin+num1(isym(is)+1)
            read(26)h8(ideb:ifin)
         enddo
         !read(26) h8
         ii=0
         do is=1,nsym
            do i=1,isym(is)
               i1=i+sum(isym(1:is-1))
               do j=1,i
                  j1=j+sum(isym(1:is-1))
                  ii=ii+1
                  hmonot(i1,j1)=h8(ii)
               enddo
            enddo
         enddo
         call ecris(-21,hmonot,norb,'BID','BID',.false.,nsym,isym,
     *   insinv)
         deallocate(hmonot)
      endif
      deallocate(h8)
      return
      end
