[bionet.journals.contents] Searching contents using VMS - quick and dirty

MARDER%HUJIAGRI@PUCC.PRINCETON.EDU (Jonathan Marder) (12/18/90)

Hi,
  Some weeks ago I asked who had methods for pulling references by
keyword from the tables of contents received via BIO-JRNL.  A belated
reply to those who answered.  In the end I came up with a solution
of my own which enables me do rapidly search incoming lists and
produce output:-
- without leaving VMS
- without even leaving our mail-reading software
- using a subprogram consisting of just a few commands

I am providing this solution for users of VMS systems - the commands are
specific to the VMS EDT editor.  I am sure that similar types of solution
are possible for other systems.  In my own case, it was only by learning
to use EDT properly (not just in fullscreen mode) that I realised just how
powerful it is.
The details are as follows:-
1. I read the  mail message using the READ/EDIT option (which uses the EDT
   editor by default).

2. I execute the following string of commands:-
    SET QUIET
    F B;c;10000(s"//"")ex
! The above line is to make seperate paragraphs out of contents lists with
! entries seperated by double-slashes rather than blank lines.
    F B;insert "CC "+1;CC My_subject-related Contents
! The above is just to remind me that the output is a selected listing.
    c;(APPEND1PAR=Output)ex
! The above line moves the "CC" lines (list heading etc.) to output buffer
    F B;c;1000("Keyword_1"APPEND1PAR=Output)ex
! Selects paragraphs containing keyword_1 and move them to output buffer
    F B;c;1000("Keyword_2"APPEND1PAR=Output)ex
    F B;c;1000("Keyword_3"APPEND1PAR=Output)ex
    F B;c;1000("Keyword_4"APPEND1PAR=Output)ex
! Repeats for several more keywords
    F=Output
! Switches to the output buffer.

(3. I usually check the output here by entering fullscreen mode using the
    "Change" command).

4.  I make a file of the output using the command "Write filename"

Anyone wanting to understand the above should enter the VMS EDT editor and
use the help facility.  The abrreviated commands used above are:-
F B    - Find Begin
c      - change
All the rest e.g. " ("keyword"APPEND1PAR=Output)ex " are subcommands of
change (HELP CHANGE SUBCOMMANDS).

MAKING IT EASY
**************
It would be a real nuisance to type so many command lines for each search,
so I keep the command lines as a separate file (called SRCHPROG.EDT).  I
also have the following two lines in file EDTINI.EDT (user profile for the
EDT editor):-
    F=Keys;inc srchprog.edt ;F=main
    DEF macro keys
(Users who don't have a EDTINI.EDT file can enter these two lines
themselves after entering the editor, or find another way of getting the
search command lines into a separate buffer).

I now have a command "keys" available whenever I use the editor.  It isn't
perfect but VERY fast and direct.  I will gladly answer queries.
***************************************************************************
: Jonathan B. Marder                 :                                    :
: Department of Agricultural Botany  :  Bitnet:    MARDER@HUJIAGRI        :
: The Hebrew University of Jerusalem :  Internet:  MARDER@AGRI.HUJI.AC.IL :
: Faculty of Agriculture             :  Phone:     (08 or +9728) 481918   :
: P.O. Box 12, Rehovot 76100, ISRAEL :  Facsimile: (08 or +9728) 462181   :
***************************************************************************