anchor.diff:    call f_requestUnit('CollPositions.dat', CollPositions_unit)
     open(unit=CollPositions_unit, file='CollPositions.dat')
   
  -  ! Read collimator database
  -  call cdb_readCollDB(coll_db)
  -
  -  db_ncoll = cdb_nColl
  -  do i=1,db_ncoll
  -  end do
  +!++  Read collimator database
  +  call readcollimator
   
   !Then do any implementation specific initial loading
   #ifdef COLLIMATE_K2
  
positive.code:   open(unit=betafunctions_unit, file='betafunctions.dat') !was 57
  
    if(dowrite_amplitude) then
      write(amplitude_unit,*)                                             &
       &'# 1=ielem 2=name 3=s 4=AX_AV 5=AX_RMS 6=AY_AV 7=AY_RMS',         &
       &'8=alphax 9=alphay 10=betax 11=betay 12=orbitx',                  &
       &'13=orbity 14=tdispx 15=tdispy',                                  &
       &'16=xbob 17=ybob 18=xpbob 19=ypbob'
  
      do i=1,iu
         write(amplitude_unit,'(i4, (1x,a16), 17(1x,e20.13))')             &!hr08
  
negative.code:     end if !if(rselect.gt.0 .and. rselect.lt.65) then
    end if !if( firstrun ) then
  
  !GRD HERE WE LOOK FOR ADEQUATE DATABASE INFORMATION
    found = .false.
  
  !     SR, 01-09-2005: to set found = .TRUE., add the condition L>0!!
    do j = 1, db_ncoll
      if((db_name1(j)(1:mNameLen).eq.bez(myix)(1:mNameLen)) .or. &
         (db_name2(j)(1:mNameLen).eq.bez(myix)(1:mNameLen))) then
        if( db_length(j) .gt. zero ) then
          found = .true.
          icoll = j
          if(firstrun) then
            coll_found(j) = .TRUE.
            write(CollPositions_unit,*) j, db_name1(j), totals
          end if
        end if
      end if
    end do
  
    if(.not. found .and. firstrun .and. iturn.eq.1) then
      write(lout,"(a)") "COLL> WARNING Collimator not found in colldb: '"//trim(bez(myix))//"'"
    end if
  
  end subroutine collimate_start_collimator
  
  