c COMBPOST.FOR
c
c  Ad-hoc program to concatonate post files.
c  Jeff Phillips
c
      character*50 ifile,ofile
      character*1 ans
      character*8 id
      dimension post(8)
      icount=0
      write(6,1)
1     format(' Enter first input file name:')
      print 101
101   format(' *'$)
      read(5,100)ifile
100   format(a)
103   open(10,file=ifile,form='unformatted',status='old')
      if(icount.ne.0)go to 270
      write(6,201)
201   format(1x,'Enter output file name:')
      print 101
      read(5,100)ofile
      open(11,file=ofile,form='unformatted',status='new')
270   i=0
271   read(10,end=250)id,post
      i=i+1
      write(11)id,post
      go to 271
250   icount=icount+i
      print*,'Points in this file =',i
252   print*,'Another ? (y or n):'
      print 101
      read(5,100)ans
      if(ans.ne.'y'.and.ans.ne.'n')then
	print*,'Answer yes or no:'
	go to 252
      endif
      if(ans.eq.'n')go to 900
      print*,'Enter next file name:'
      read(5,100)ifile
      go to 103
900   print*,'Total points =',icount
998   close(11)
999   close(10)
      stop
      end
