      program ReadMarkIII

!*       N    = The number of objects (galaxies, groups or clusters) in
!*              the catalog
!*       ig   = serial number
!*       ic   = number in subset, according to:
!*              0   - 499 - ellipticals, Lynden-Bell et al. 1988
!*              500 - 599 - Aaronson et al. 1982
!*              600 - 600 - Han & Mould clusters,  1990, 1992.
!*              700 - 899 - Courteau & Faber 1992
!*              900 - 999 - Willick 1991
!*              1000 -    - Mathewson et al. 1992
!*       sgl  = Supergalactic logtitude, L in degrees
!*       sgb  = Supergalactic latitude,  B in degrees
!*       slog = log of (linewidth in  km/s)
!*       em   = apparent Tully-Fisher magnitude
!*       izcmb= Redshift in CMB frame, in km/s
!*       itfd = TF distance in km/s
!*       delta=relative distance error
!*       gname = galaxy name  (only in the real catalog)
!*       cname = cluster name (only in the real catalog)

      character*100 baseDAT,extDAT,fname
      character*10 gname,cname

      character*2 cfile2
      character*1 cfile1

      baseDAT='/mybase/'
      extDAT='mark3.dat'

      fname=baseDAT(1:len_trim(baseDAT))//extDAT(1:len_trim(extDAT))

      print *,'Reading : ',fname
      
      open(1,file=fname,status='old')
      read(1,*)
      read(1,*) N      
      
      print*,'Found N : ',N

      read(1,*)
      do i=1,N
         read(1,100) ig,ic,ng,sgl,sgb,slog,em,izcmb,itfd,delta,gname,cname
         print *,'ig,ic,ng,sgl,sgb,izcmb,itfd,delta,gname,cname : ',ig,ic,ng,sgl,sgb,izcmb,itfd,delta,gname,cname
      enddo
         
  100 format(i4,i5,i4,2f7.2,f7.3,f6.2,2i6,f6.3,2(1x,a10))
      close(1)
         
      print *,'Reading completed ...'

      stop
      end



