      subroutine PACPRO(RECNUM)
      include 'SIZE.INC'
      include 'GLOBAL.INC'
      include 'LOCAL.INC'
      include 'UNITS.INC'
      real BUFFER(VARREC), IO(2*NTRAN)
      integer IBUFF(VARIEC), IOI(4*NTRAN), RRECS, IRECS, CRECS, TRECS,
     &NREALS, NINTS, NCHARS, RECNUM, OFFSET
      integer RECDAT(FILDAT), HRECS
      integer I,NUSED,M,L,ISET,J,K
      character*1 CBUFF(VARCEC), IOC(62)
      do 100 I = 1, VARCEC
         CBUFF(I) = ' '
100   continue
      do 110 I = 1, VARIEC
         IBUFF(I) = 0
110   continue
      do 120 I = 1, VARREC
         BUFFER(I) = 0.0
120   continue
      NUSED = 0
      do 130 I = 1, NTRAN
         IO(NUSED+1) = YIELDG(I)
         IO(NUSED+2) = EAYLDG(I)
         NUSED = NUSED+2
130   continue
      NUSED = 0
      do 140 I = 1, NTRAN
         IOI(NUSED+1) = CHPARG(I)
         IOI(NUSED+2) = TPRODG(I)
         IOI(NUSED+3) = NPROCG(I)
         IOI(NUSED+4) = RFORMG(I)
         NUSED = NUSED+4
140   continue
      do 150 I = 1, 50
         IOC(I) = PRODNM(I)
150   continue
      NUSED = 50
      do 160 I = 1, 6
         IOC(NUSED+1) = RPASS(4)(I:I)
         IOC(NUSED+2) = WPASS(4)(I:I)
         NUSED = NUSED+2
160   continue
      HRECS = FILDAT/VARIEC
      if (FILDAT-VARIEC*HRECS.ne.0) HRECS = HRECS+1
      M = 0
      do 180 I = 1, HRECS
         read (RANUNT(MACHNO),rec=I) IBUFF
         do 170 L = 1, VARIEC
            M = M+1
            if (M.gt.FILDAT) go to 190
            RECDAT(M) = IBUFF(L)
170      continue
180   continue
190   continue
      RRECS = RECDAT(39)
      IRECS = RECDAT(40)
      CRECS = RECDAT(57)
      TRECS = RRECS+IRECS+CRECS
      NREALS = RECDAT(43)
      NINTS = RECDAT(44)
      NCHARS = RECDAT(53)
      ISET = RECDAT(47)-1
      OFFSET = (RECNUM-1)*TRECS+ISET
      do 220 I = 1, RRECS
         J = (I-1)*VARREC
         K = J+VARREC
         J = J+1
         M = 0
         do 200 L = J, K
            M = M+1
            if (L.gt.NREALS) go to 210
            BUFFER(M) = IO(L)
200      continue
210      continue
         J = OFFSET+I
         write (RANUNT(MACHNO),rec=J) BUFFER
220   continue
      OFFSET = OFFSET+RRECS
      do 250 I = 1, IRECS
         J = (I-1)*VARIEC
         K = J+VARIEC
         J = J+1
         M = 0
         do 230 L = J, K
            M = M+1
            if (L.gt.NINTS) go to 240
            IBUFF(M) = IOI(L)
230      continue
240      continue
         J = OFFSET+I
         write (RANUNT(MACHNO),rec=J) IBUFF
250   continue
      OFFSET = OFFSET+IRECS
      do 280 I = 1, CRECS
         J = (I-1)*VARCEC
         K = J+VARCEC
         J = J+1
         M = 0
         do 260 L = J, K
            M = M+1
            if (L.gt.NCHARS) go to 270
            CBUFF(M) = IOC(L)
260      continue
270      continue
         J = OFFSET+I
         write (RANUNT(MACHNO),rec=J) CBUFF
280   continue
      return
      end
