home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / chrchpr2.zip / REFDXLST.CMD < prev    next >
OS/2 REXX Batch file  |  1987-01-06  |  2KB  |  59 lines

  1. *Program REFDXLST - Displays the list of index words to the active REFERNCE fi
  2. Select secondary
  3. *Store d+':REFINDEX' to MFILE
  4. *Store d+':REFINDKW' to MFILENDX
  5. Use &MFILE index &MFILENDX
  6. Set raw on
  7. Set exact off
  8. ERASE
  9.   @ 2,3 say INH+'    '+curdate
  10.   Store 1 to WCOUNT
  11.   ?
  12.   Store ' ' to keywordx
  13.   Store ' ' to sorcecodes
  14.   Store '~~~~~' to oldkey
  15.   Store '~' to INX
  16.   Do while keywordndx<>INX  .and. .not. EOF
  17.     If keywordndx<>oldkey .or. wcount>3
  18.       If wcount>1
  19.         ? keywordx,sorcecodes
  20.       endif
  21.       If wcount>3
  22.         Store '                    ' to keywordx
  23.         If keywordndx<>oldkey
  24.           Store keywordndx to oldkey
  25.           Store keywordndx to keywordx
  26.           ?
  27.         endif
  28.       else
  29.         Store keywordndx to oldkey
  30.         Store keywordndx to keywordx
  31.         ?
  32.       endif
  33.       Store 1 to wcount
  34.       Store ' ' to sorcecodes
  35.     endif
  36.     Store wcount+1 to wcount
  37.     Store sorcecodes+$(sourcecode,1,8)+' '+$(sourcecode,9,2)+' '+;
  38. $(sourcecode,11,2)+' '+$(sourcecode,13,2)+'| ' to sorcecodes
  39.     SKIP
  40.   enddo
  41. USE
  42. ? keywordx,sorcecodes
  43. ?
  44. Accept 'End of Reference/Publications Index. Press <RETURN>' to XX
  45. Set raw off
  46. Set exact on
  47. Use
  48. Release keyword,oldkey,inx,sorcecodes,wcount,keywordx,s,mfilendx
  49. RETURN
  50.  
  51.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ?
  52.   Store ' ' to keywordx
  53.   Store ' ' to sorcecodes
  54.   Store '~~~~~' to oldkey
  55.   Store '~' to INX
  56.   Do while keywordndx<>INX  .and. .not. EOF
  57.     If keywordndx<>oldkey .or. wcount>3
  58.       If wcount>1
  59.         ? keywordx,sorcec