        program catcheck
c
c       does a few quick checks of orb6.master:
c       (1) All lines in order of increasing RA
c       (2) All lines for given pair have identical coordinates, WDS, DD, comp
c
        dimension ra(20000)
        character*42 star(20000),star1,star2
c
        open(10,file='orb6.master',status='UNKNOWN')
        open(11,file='catcheck.out',status='UNKNOWN')
c
        do 100 n=1,4
  100   read(10,901) junk
  901   format(a1)
c
        nn=0
  200   nn=nn+1
        read(10,902,end=300) ra(nn),star(nn)
  902   format(f9.2,t1,a42)
        go to 200
c
  300   nn=nn-1
        ra1=ra(1)
        do 400 n=2,nn
        if (star(n) .eq. '                                          ') 
     $     go to 400
        if (ra(n) .lt. ra1) write(11,903) ra1,ra(n)
  903   format(2f12.2)
        ra1=ra(n)
  400   continue
c
  500   do 600 n=1,nn-1
        star1=star(n)
        star2=star(n+1)
        if (star1 .eq. '                                          ') 
     $     go to 600
        if (star2 .eq. '                                          ') 
     $     go to 600
        if (star1 .ne. star2) write(11,904) star1,star2
  904   format(a42,2x,a42)
  600   continue
c
  999   stop
        end

