      subroutine UNPREC (RECNUM,OUTPUT,LENGTH,OUTSIZ)
      include 'SIZE.INC'
      include 'UNITS.INC'
      integer BUFFER(VARIEC),LENGTH,OUTSIZ,OUTPUT(OUTSIZ),RECNUM,L,M,I
      RECNUM = RECNUM+1
      read (RANUNT(MACHNO),rec=RECNUM) BUFFER
      LENGTH = BUFFER(1)
      L = 1
      M = 0
      do 100 I = 1, LENGTH
         L = L+1
         if (L.gt.VARIEC) then
            RECNUM = RECNUM+1
            read (RANUNT(MACHNO),rec=RECNUM) BUFFER
            L = 1
         endif
         M = M+1
         OUTPUT(M) = BUFFER(L)
100   continue
      return
      end
