home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / moss.zip / INDF.PRG < prev    next >
Text File  |  1986-11-09  |  936b  |  45 lines

  1. SET SAFETY OFF
  2. clear
  3. set talk off
  4. fin=0
  5. fin2=0
  6. ? "Please choose the fields you would like to arrange the records by."
  7. fn=1
  8. set talk off
  9. do while fn<20
  10.  @ fn+2,3 say (str(fn,2)+". "+field(fn))
  11.  fn=fn+1
  12. enddo
  13. do while fn<40
  14.  @ fn-17,35 say (str(fn,2)+". "+field(fn))
  15.  fn=fn+1
  16. enddo
  17. @ 2,1 to 22,20 double
  18. @ 2,33 to 22,53 double
  19. @ 3,55 say "DATABASE IN USE:"+dab
  20. @ 2,54 TO 5,78
  21. @ 23,1 say "  Input number corresponding to primary index:" get fin picture "99" range 1,39
  22. @ 24,1 say "                              Secondary Index:" get fin2  picture "99" range 1,39
  23. read
  24. clear
  25. ind=space(8)
  26. @ 2,2 say "Please give a name to this index file:" get ind
  27. read
  28. nd=ndx(1)
  29. inf=field(fin)
  30. if fin2=0
  31. index on &inf to &ind
  32. else
  33. on error DO INERROR
  34.  inf2=field(fin2)
  35.  
  36.  index on &inf + &inf2 to &ind
  37. endif
  38. if len(trim(nd))>1
  39. on error set index to &ind
  40. set index to &ind,&nd
  41. else 
  42. set index to &ind
  43. endif
  44. return
  45.