anchor.diff:  c
         if(iucd.ne.izero) then
           iopt=4
  -        call open_ucd(kucd,iprestress,nstep,ucdroot,iopt)
  -        call write_ucd_header(istatoutc,nstatestot,kucd)
  +        call open_ucd(kucd,iprestress,nstep,ucdroot,iopt,iucd)
  +        call write_ucd_header(istatoutc,nstatestot,kucd,iucd)
         end if
  +c
  +c...  initialize max, min, and byte location values for binary UCD
  +c
  +      intlen=ifour
  +      floatlen=ifour
  +      call fill(statemin,big,3*nstatesmax)
  +      call fill(statemax,-big,3*nstatesmax)
  +      ibyte=ione+2048+intlen*(1+nstatestot)
  +      istride=ngauss*numelv*floatlen
  +      ibyteg(1)=ibyte+2*floatlen*nstatestot
  +      do i=2,nstatestot
  +        ibyteg(i)=ibyteg(i-1)+istride
  +      end do
   c
   c...  loop over element families
   c
  
positive.code: c
  c...  local variables
  c
        integer istatoutc(nstatesmax*3)
        integer nstatestot,nout,npts,ind,i,j,iopt
        integer ifam,nelfamily,matmodel,indstate,nstate,ielg
        double precision delti
  c
  c...  included variable definitions
  c
  
negative.code:      &     ngauss,                                                      ! eltype
       &     delti,nstep,                                                 ! timdat
       &     istatout,istatoutc,nstatout,nstatestot,nout,npts,            ! ioopts
       &     statemin,statemax,ibyteg,                                    ! binucd
       &     idout,idsk,iucd,kw,kp,kucd)                                  ! ioinfo
          else if(matmodel.eq.10) then
            call write_state_cmp(
  