home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / librdb2.zip / ADDSUB.CMD next >
OS/2 REXX Batch file  |  1987-02-14  |  1KB  |  36 lines

  1. * ADDSUB.CMD - adds new SUBJECT entries to an existing library reference.
  2. * This is a subprogram called by GUIDE.CMD
  3. * by M. Timin, November 1982
  4.  
  5. * Get the record number of the existing reference
  6. erase
  7. STORE 1 TO RECNUM
  8. INPUT "Enter the record number: "  TO  RECNUM
  9. SELECT PRIMARY
  10. GOTO RECNUM
  11.  
  12. * enter data into one or more new SUBJECTS records:
  13. SELECT SECONDARY
  14. STORE F TO DONE
  15. DO WHILE .NOT. DONE
  16.    ERASE
  17.    STORE "            "  TO SUB
  18.    @ 2,9 SAY P.DESCRIP
  19.    @ 4,2 SAY "Enter a SUBJECT name under which this"
  20.    @ 5,2 SAY "reference might be classified"  GET SUB  picture '!!!!!!!!!!!!'
  21.    @ 7,2 SAY "(Hit return when there are no more subjects.)"
  22.    READ
  23.    IF SUB="            "
  24.       STORE T TO DONE
  25.    ELSE
  26.       ? "Is "+SUB+" correct? "
  27.       WAIT TO WHATKEY
  28.       IF WHATKEY="Y" .OR. WHATKEY="y"
  29.          APPEND BLANK
  30.          REPLACE KEY WITH $(P.FILE,1,6)+$(P.SEARCHKEY,1,8)+STR(P.DISK,2)
  31.          REPLACE SUBJECT WITH SUB
  32.       ENDIF
  33.    ENDIF
  34. ENDDO
  35. RETURN
  36.  WITH $(P.FILE,