anchor.diff:  c
   c...  local variables
   c
  -      integer i,j,nstatestot,nstatesinc,nstatesrate
  -      integer itmp(3,nstatesmax)
  +      integer i,j
   c
   c...  included variable definitions
   c
         include "labels_def.inc"
   c
         ierr=izero
  -      call ifill(itmp,izero,3*nstatesmax)
  -      nstatestot=izero
  -      nstatesinc=izero
  -      nstatesrate=izero
  +      call ifill(istatout,izero,3*nstatesmax)
  +      call ifill(nstatout,izero,3)
   c
   c...  open input file and read information on state variable output.
   c     The same variables will be output for both the elastic and
   c     time-dependent solutions.
   c
         open(kr,file=stfile,status="old",err=20)
  -      do i=1,nstatesmax
  +      do i=1,3
           call pskip(kr)
  -        read(kr,*,err=30,end=30) (istatout(j,i),j=1,3)
  +        read(kr,*,err=30,end=30) nstatout(i),
  +     &   (istatout(j,i),j=1,nstatout(i))
         end do
         close(kr)
   c
  -c...  dump istatout array into index array
  -c
  -      do i=1,nstatesmax
  -        if(istatout(1,i).ne.izero) then
  -          nstatestot=nstatestot+ione
  -          itmp(1,nstatestot)=i
  -        end if
  -        if(istatout(2,i).ne.izero) then
  -          nstatesinc=nstatesinc+ione
  -          itmp(2,nstatesinc)=i
  -        end if
  -        if(istatout(3,i).ne.izero) then
  -          nstatesrate=nstatesrate+ione
  -          itmp(3,nstatesrate)=i
  -        end if
  -      end do
  -c
   c...  output results, if desired
   c
         if(idout.gt.izero) then
           open(kw,file=ofile,err=40,status="old",access="append")
  -        if(nstatestot.ne.izero) then
  +        if(nstatout(1).ne.izero) then
             write(kw,700,err=50)
  -          write(kw,730,err=50) (labels(itmp(1,i)),i=1,nstatestot)
  +          write(kw,730,err=50) (labels(istatout(i,1)),i=1,nstatout(1))
           end if
  -        if(nstatesinc.ne.izero) then
  +        if(nstatout(2).ne.izero) then
             write(kw,710,err=50)
  -          write(kw,730,err=50) (labels(itmp(2,i)),i=1,nstatesinc)
  +          write(kw,730,err=50) (labels(istatout(i,2)),i=1,nstatout(2))
           end if
  -        if(nstatesrate.ne.izero) then
  +        if(nstatout(3).ne.izero) then
             write(kw,720,err=50)
  -          write(kw,730,err=50) (labels(itmp(3,i)),i=1,nstatesrate)
  +          write(kw,730,err=50) (labels(istatout(i,3)),i=1,nstatout(3))
           end if
           close(kw)
         end if
         if(idsk.eq.ione) then
           open(kp,file=pfile,err=40,status="old",access="append")
  -        write(kp,810,err=50) ((istatout(j,i),j=1,3),i=1,nstatesmax)
  +        do i=1,3
  +          write(kp,810,err=50) nstatout(i),
  +     &     (istatout(j,i),j=1,nstatout(i))
  +        end do
         end if
         if(idsk.eq.itwo) then
           open(kp,file=pfile,err=40,status="old",access="append",
  
positive.code: c...  subroutine arguments
  c
        integer kr,kw,kp,idout,idsk,ierr
        integer istatout(3,nstatesmax)
        character stfile*(*),ofile*(*),pfile*(*),errstrng*(*)
  c
  c...  included dimension and type statements
  
negative.code: c     The istatout array specifies output options for each individual
  c     state variable.  At present there are a maximum of 24 possible
  c     state variables, and this number may increase with the addition
  c     of new material models.  There are three types of state variable
  c     output:
  c
  c           1  Total accumulated values for the current time step
  c           2  Incremental values from the previous step to the current
  c           3  Rates computed from the previous step to the current
  c
  c      Present state variables occur in groups of 6, corresponding to
  c      the number of stress/strain components, although this may change
  