home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
MBUG
/
MBUG061.ARC
/
LIBED2.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1979-12-31
|
2KB
|
67 lines
**************************************** LIBED2.CMD
**************************** Allow user to edit reference,
**************************** then re-update keywords file.
*************** (This command file was created by "borrowing"
*************** a portin of LIBADD.CMD, and modifying).
ERASE
@ 1, 3 SAY "Record No. "+STR(#,3)
@ 2, 0 SAY "--------------------------------------------------"
@ 2,50 SAY "------------------------------"
@ 4, 3 SAY "Author"
@ 4,12 GET AUTHOR
@ 5, 3 SAY "Title"
@ 5,12 GET TITLE
@ 6, 3 SAY "Pub."
@ 6,12 GET PUB
@ 7, 3 SAY "Date"
@ 7,12 GET DATE PICT "99/99/99"
@ 7,26 SAY "Pages"
@ 7,32 GET PAGES
@ 9, 3 SAY "Abstract"
@ 9,12 GET ABSTRACT
@ 13, 3 SAY "Keyword 1"
@ 13,13 GET K1
@ 14, 3 SAY "Keyword 2"
@ 14,13 GET K2
@ 15, 3 SAY "Keyword 3"
@ 15,13 GET K3
@ 16, 3 SAY "Keyword 4"
@ 16,13 GET K4
@ 17, 3 SAY "Keyword 5"
@ 17,13 GET K5
@ 18, 3 SAY "Keyword 6"
@ 18,13 GET K6
@ 19, 3 SAY "Keyword 7"
@ 19,13 GET K7
@ 21, 0 SAY "--------------------------------------------------"
@ 21,50 SAY "------------------------------"
READ
****************** Update Keyword File.
SELECT SECONDARY
STORE " " TO TEMPKEY
STORE 1 TO COUNT
STORE STR(COUNT,1) TO MAC
DO WHILE K&MAC <> " " .AND. COUNT < 8
STORE !(K&MAC) TO K&MAC
FIND &K&MAC
IF # > 0
REPLACE KEYNO WITH KEYNO+1
ELSE
APPEND BLANK
REPLACE KEYWORD WITH K&MAC
REPLACE KEYNO WITH 1
ENDIF (# > 0)
*** Now, concatentate K&MAC into temporary KEYWORDS string.
STORE TEMPKEY+TRIM(K&MAC)+", " TO TEMPKEY
STORE COUNT +1 TO COUNT
STORE STR(COUNT,1) TO MAC
ENDDO (k&mac<>" ")
*********************** Put tempkey into keywords
SELECT PRIMARY
REPLACE KEYWORDS WITH TEMPKEY
RETURN