      subroutine CATLG
      include 'SIZE.INC'
      include 'INPAR.INC'
      include 'UNITS.INC'
      real RESULT
      integer II, I1, I2, ISET, MAXREC, IBUFF(VARIEC)
      integer WHICH,CC,OFF(5,4),M,I,L,IO1,IO2,IO3,IO4,IO5,IP,J
      integer RECDAT(FILDAT),HRECS,LRAIL
      character CBUFF*50
      data OFF / 9, 15, 16, 54, 17, 11, 21, 22, 55, 23,
     &            45, 33, 34, 56, 35, 47, 39, 40, 57, 41/
      call DECOD1 (4,WHICH,CC,RESULT)
      if (CC.ne.1) go to 170
      HRECS = FILDAT/VARIEC
      if (FILDAT-VARIEC*HRECS.ne.0) HRECS = HRECS+1
      M = 0
      do 110 I = 1, HRECS
         read (RANUNT(MACHNO),rec=I) IBUFF
         do 100 L = 1, VARIEC
            M = M+1
            if (M.gt.FILDAT) go to 120
            RECDAT(M) = IBUFF(L)
100      continue
110   continue
120   continue
      IO1 = OFF(1,WHICH)
      IO2 = OFF(2,WHICH)
      IO3 = OFF(3,WHICH)
      IO4 = OFF(4,WHICH)
      IO5 = OFF(5,WHICH)
      ISET = RECDAT(IO1)
      I2 = RECDAT(IO2)+RECDAT(IO3)
      I1 = I2+RECDAT(IO4)
      MAXREC = RECDAT(IO5)
      IP = 0
      do 160 I = 1, MAXREC
         II = (I-1)*I1+I2+ISET
         read (RANUNT(MACHNO),rec=II) CBUFF
         do 130 J = 1, 50
            if (CBUFF(J:J).ne.' ') go to 140
130      continue
         go to 160
140      continue
         if (IP.eq.1) go to 150
         IP = 1
         if (WHICH.eq.1) write (TTYOUT(MACHNO),5000)
5000     format (/' Catalog of CHEMICAL parameter sets')
         if (WHICH.eq.2) write (TTYOUT(MACHNO),5010)
5010     format (/' Catalog of ENVIRONMENTal models')
         if (WHICH.eq.3) write (TTYOUT(MACHNO),5020)
5020     format (/' Catalog of Chemical LOADings')
         if (WHICH.eq.4) write (TTYOUT(MACHNO),5030)
5030     format (/' Catalog of PRODUCT Chemistries')
         write (TTYOUT(MACHNO),5040)
5040  format (/' UDB No.     Name of Entry Volume'/' =======    ========
     &===============')
150      continue
         J = LRAIL(CBUFF,50)
         write (TTYOUT(MACHNO),5050) I,CBUFF(1:J)
5050     format (2X,I5,5X,A)
160   continue
      if (IP.eq.0) write (TTYOUT(MACHNO),5060)
5060  format (/' No records defined for this library.')
170   continue
      return
      end
