      subroutine direct (idx,ndx)                                       DIRE001
c -------------------------------------------------------------------   DIRE002
c     retrieve directory of database SEXIE.DBF using index SEXIE.IDX    DIRE003
c ----------------------------------------------------------------------DIRE004
c     This program module is part of the PhysiSoft X-ray Library        DIRE005
c     and may not be sold or reproduced for commercial purposes.        DIRE006
c     Although it has been tested carefully, there is no warranty       DIRE007
c     regarding accuracy or freedom from side-effects.                  DIRE008
c                   (C) 1986-1990 Bernhard Rupp                         DIRE009
c ----------------------------------------------------------------------DIRE010
                                                                        DIRE011
      parameter (iat=20,iidx=3200)                                      DIRE012
                                                                        DIRE013
      character answ,nlbl*8,title*60                                    DIRE014
      integer idx (iidx)                                                DIRE015
                                                                        DIRE016
   22 format (a60)                                                      DIRE017
      ipr=6                                                             DIRE018
      ilines=0                                                          DIRE019
      do 1001 i=1,ndx                                                   DIRE020
         if(idx(i).gt.0) then                                           DIRE021
         irec=idx(i)                                                    DIRE022
         read(1,'(2x,a8)',rec=irec) nlbl                                DIRE023
         read(1,22,rec=irec+1) title                                    DIRE024
         write(ipr,'(a,a)')  '  LABEL : ',nlbl                          DIRE025
         write(ipr,'(a,a)')  '  TITLE : ',title                         DIRE026
         ilines=ilines+2                                                DIRE027
         if (mod(ilines,24).eq.0) then                                  DIRE028
            write(ipr,'(a$)') '  More (Y/N) : '                         DIRE029
            call inkey(answ)                                            DIRE030
            if (answ.ne.'Y') goto 1002                                  DIRE031
            ilines=0                                                    DIRE032
         end if                                                         DIRE033
         end if                                                         DIRE034
 1001    continue                                                       DIRE035
      print*,' '                                                        DIRE036
      print*,                                                           DIRE037
     & ' No more entries found - hit enter to return to database menu ' DIRE038
      call inkey (answ)                                                 DIRE039
 1002 return                                                            DIRE040
      end                                                               DIRE041
