      subroutine events (record, agcode, ios)

      character*96 record
      character*6 agcode(1000)

c process events

      include 'basics.inc'

      include 'hold.inc'

      logical choose, finish

      do while (ios .eq. 0)

c read an event

        call evread (record, ios)

c if selected then show it

        if (choose(finish)) call evshow (agcode)

c close the /hold/ overflow file, if it was been used for this event

c        if (norec .gt. maxrec) close (unit=ntemp)

c      close (unit=ntemp) 

c force eof termination if passed final date/time selected

        if (finish) ios = -1
      end do
      return
      end
