anchor.diff:  c
    30   continue
           ierr=3
  +        errstrng="read_fuldat"
           close(kr)
  +        return
  +c
  +c...  error opening output file
  +c
  + 40   continue
  +        ierr=2
  +        errstrng="read_fuldat"
  +        close(kw)
  +        close(kp)
  +        return
  +c
  +c...  error writing to output file
  +c
  + 50   continue
  +        ierr=4
  +        errstrng="read_fuldat"
  +        close(kw)
  +        close(kp)
           return
   c
   1000  format(//5x,
  
positive.code: c         0:  No error
  c         1:  Error opening input file (only if there is a
  c             time-dependent solution)
  c         2:  Units not specified (not applicable for this routine)
  c         3:  Read error
  c
        include "implicit.inc"
  c
  c...  subroutine arguments
  c
        integer icontr,icode,ncycle,lastep,kr,kw,kp,idout,idsk,ierr
        integer iprint(icontr)
        character fdfile*(*),ofile*(*),pfile*(*)
  c
  c...  local variables
  c
        integer i1,nline,nrem,i,j
  c
        ierr=0
  c
  c...  read time steps at which a full output is desired
  c
        if(lastep.ne.0.and.icode.eq.3) then
          open(kr,file=fdfile,status="old",err=20)
          call pskip(kr)
          do i=1,icontr
  
negative.code: c
  c...  output results, if desired
  c
        if(idout.gt.izero) open(kw,file=ofile,err=40,status="old",
       & access="append")
        if(idsk.eq.izero) open(kp,file=pfile,err=40,status="old",
       & access="append")
        if(idsk.eq.1) open(kp,file=pfile,err=40,status="old",
       & access="append",form="unformatted")
        if(icode.ne.itwo.and.idout.gt.izero) write(kw,1000,err=50)  ncycle
        i1=0
        if((icode.eq.itwo).or.(icontr.eq.izero)) then
          if(idsk.eq.izero) write(kp,4000,err=50) i1,i1,i1
          if(idsk.eq.ione) write(kp,err=50) i1,i1,i1
          close(kp)
          return
        else
          if(idsk.eq.izero) write(kp,4000,err=50) icontr,ncycle,lastep
          if(idsk.eq.ione) write(kp,err=50) icontr,ncycle,lastep
          if(idout.gt.izero) write(kw,2000,err=50) icontr
          if(idsk.eq.ione) write(kp,err=50) (iprint(i),i=1,icontr)
          nline=icontr/7
          nrem=icontr-nline*7
          do i=1,nline
            if(idout.gt.izero) write(kw,3000,err=50) (iprint(7*(i-1)+j),
       &     j=1,7)
            if(idsk.eq.izero) write(kp,4000,err=50) (iprint(7*(i-1)+j),
       &     j=1,7)
          end do
          if(nrem.ne.izero) then
            if(idout.gt.izero) write(kw,3000,err=50) (iprint(7*nline+j),
       &     j=1,nrem)
            if(idsk.eq.izero) write(kp,4000,err=50) (iprint(7*nline+j),
       &     j=1,nrem)
          end if
        end if
        if(idout.gt.izero) close(kw)
        close(kp)
  c
  c...  normal return
  