home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / misc / activism / progress / 8215 < prev    next >
Encoding:
Text File  |  1992-11-08  |  11.1 KB  |  320 lines

  1. Newsgroups: misc.activism.progressive
  2. Path: sparky!uunet!gatech!ukma!mont!pencil.cs.missouri.edu!rich
  3. From: rich@pencil.cs.missouri.edu (Rich Winkel)
  4. Subject: USING LISTSERV'S ARCHIVE AND DATABASE FUNCTIONS (autopost)
  5. Message-ID: <1992Nov8.093005.28414@mont.cs.missouri.edu>
  6. Followup-To: alt.activism.d
  7. Originator: rich@pencil.cs.missouri.edu
  8. Sender: news@mont.cs.missouri.edu
  9. Nntp-Posting-Host: pencil.cs.missouri.edu
  10. Organization: PACH
  11. Date: Sun, 8 Nov 1992 09:30:05 GMT
  12. Approved: map@pencil.cs.missouri.edu
  13. Lines: 305
  14.  
  15. LISTSERV@UMCVMB acts as a network file server for two sets of
  16. ACTIV-L-related files, the "library" and the "database".
  17.  
  18. The library contains a hand-picked collection of some
  19. of the most important articles posted to activ-l since its inception.
  20. Any file in the library can be retrieved via email.  To retrieve a
  21. file, mail the following command to listserv@umcvmb:
  22.  
  23. GET file name ACTIV-L
  24.  
  25. Note that all file names consist of two words separated by a blank.
  26. Example: "GET AMLDBASE DOC ACTIV-L" retrieves the file you are
  27. currently reading.
  28.  
  29. To get a nicely formatted list of the files in the library, send the
  30. command "GET ACTIV-L ARCHIVE".  To get a somewhat uglier (but
  31. guaranteed to be up-to-date) list, send the command "INDEX".
  32.  
  33. In addition to the library, listserv automatically places every
  34. article posted to activ-l into a database which any networker can
  35. utilize via email.  The following is a short tutorial on using
  36. listserv's database language to search and retrieve articles from the
  37. activ-l log.  It isn't meant to be an exhaustive reference, but
  38. hopefully it will get people up to speed quickly.  Please send
  39. suggestions / complaints / ramblings to MATHRICH@UMCVMB.MISSOURI.EDU.
  40. For a complete description of listserv's database language, mail the
  41. command INFO DATABASE to any listserver.
  42.  
  43. Database "jobs" (for want of a better word) consist of a sequence of
  44. database commands, bracketed by several lines of listserv "job control
  45. language" (JCL) commands, mailed in a single mail file to a listserver.
  46. The JCL commands are (for our purposes) always the same.  They are:
  47.  
  48. //SEARCH JOB ECHO=NO
  49. DATABASE SEARCH DD=RULES
  50. //RULES DD *
  51.                        <<--- any number of database
  52.                        <<--- commands go here
  53. /*
  54.  
  55. In our case, the job would be mailed to LISTSERV@UMCVMB.
  56.  
  57. *** SEARCH COMMAND ***
  58.  
  59. The most important and complicated command is the Search command.
  60. (alias Select, minimum abbreviation "S").  Its basic syntax is outlined
  61. below:
  62.  
  63. SEARCH rules [IN ACTIV-L] [date_rules] [keyword_rules]
  64.  
  65. (arguments in []'s are optional)
  66.  
  67. In general, "rules" is a search string or boolean expression applied to
  68. the message body of each article, "IN ACTIV-L" specifies which database
  69. to search, "date_rules" defines a range of dates of interest (as given
  70. in the Date:  field in the articles' mail header), and "keyword_rules"
  71. is a keyword-delimited boolean expression applied to the Subject:
  72. and/or From:  fields in the mail header.  (this is gibberish, I know...
  73. wait until we get to some examples.  Then it will be perfectly opaque)
  74.  
  75. Note:  The "IN ACTIV-L" argument must be specified in the first search
  76. command in a job.  Thereafter, each subsequent search command which
  77. omits the "IN ACTIV-L" implicitly assumes it, AND will restrict its
  78. search to those articles which were selected by the previous search
  79. command.  In other words, the logical tests in each search for which
  80. "IN ACTIV-L" is not specified are, in effect, ANDed with the tests
  81. in all previous search commands up to the last one which specified
  82. "IN ACTIV-L".
  83.  
  84. Example: The sequence of commands
  85.  
  86. SEARCH ABERCROMBIE IN ACTIV-L
  87. search warheads missles
  88. SEARCH BANANAS OR PINEAPPLES
  89.  
  90. will select those articles which contain the strings "abercrombie",
  91. "warheads" and "missles", and either "bananas" or "pineapples" (or
  92. both), in their message body.  A subsequent
  93.  
  94. SEARCH BANANAS IN ACTIV-L
  95.  
  96. will select all articles which contain "bananas" (i.e. because
  97. "IN ACTIV-L" is specified, the results of the previous searches are
  98. forgotten and the search domain is reset to the entire database)
  99.  
  100. In the above example, note the following:
  101. The searches are case insensitive by default.
  102. The search strings need not occur as discrete words in the
  103.    articles in order to get a match.  (a search string of "MAN" will
  104.    match both "man" and "woman")
  105. Blank-separated search strings (WARHEADS MISSLES) are treated as
  106.    separate logical tests ANDed together (i.e. the words need not occur
  107.    together on the same line, but must both appear somewhere in the
  108.    same article in order to satisfy the expression)
  109.  
  110. More complex search expressions are possible:
  111.  
  112. search table and (chair or stool) but not seat
  113. search table and (chair or (stool and seat))
  114. search table and not (chair or stool)
  115.  
  116. Note: "but not" = "and not" = "not"
  117.  
  118. If a search string contains embedded blanks, or a logical operator (AND,
  119. OR, NOT, =, &, |, ^, <, >) or parentheses, or a reserved keyword (IN,
  120. FROM, SINCE, TO, UNTIL, WHERE, WITH) then it should be quoted:
  121.  
  122. search 'in' in activ-l
  123. search 'military industrial complex' in activ-l
  124. search "not important" in activ-l
  125.  
  126. The difference between single (') and double (") quoting is that double
  127. quoting causes a case-sensitive search.
  128.  
  129. search "Ronald Reagan" or 'dippity doo'
  130.  
  131. The above search would select articles containing the string
  132. "Ronald Reagan" (must be an exact match) or the string "dippity doo"
  133. (case insensitive).
  134.  
  135. The special rule "*" matches any text.  The following command selects
  136. all articles in activ-l:
  137.  
  138. search * in activ-l
  139.  
  140. Date Rules
  141.  
  142. Date rules narrow a search to a specific period of time.  The syntax is
  143. very forgiving because of the number of valid date formats.  The
  144. following are all legal dates:
  145.  
  146. TODAY
  147. 91        (year 1991)
  148. 25 12     (christmas)
  149. jan       (january)
  150. 12/25     (christmas)
  151. 12-25     (christmas)
  152. 25 dec 90 (christmas 1990)
  153. 90/12/25  (christmas 1990)
  154.  
  155. Notes:
  156.    Month names can be shortened to any non-ambiguous abbreviation.
  157.    Clock time may optionally be specified in the format hour:minute.
  158.  
  159. Dates are combined with the following date rules to designate a range
  160. of time:
  161.  
  162. SINCE date time
  163. FROM date time TO date time
  164. UNTIL date time
  165.  
  166. The following examples illustrate the 3 possible ways to search by date:
  167.  
  168. search chair since 91/01/01
  169.    selects articles since jan 1, 1991 which contain the string "chair"
  170.    in the message body.
  171.  
  172. search (chair or table) in activ-l from 90/12/01 to 25 dec 90
  173.    selects articles between December 1st and December 25, 1990 which
  174.    contain either "chair" or "table" in the message body.
  175.  
  176. search * until today 18:00
  177.    selects all articles posted before 6 PM today.
  178.  
  179. Note: the boundary date(s) are included in the selected range.
  180.  
  181. Keyword Rules
  182.  
  183. For our purposes, keyword rules are used to scan Subject:  and From:
  184. fields of mail headers.  Keyword rules consist of the word "WHERE" or
  185. "WITH", followed by a series of one or more comparisons.  Valid
  186. comparison operators are (synonyms listed together on the same line):
  187.  
  188. =, "IS"
  189. ^=, <>, "IS NOT"
  190. "CONTAINS"
  191. "DOES NOT CONTAIN"
  192. "SOUNDS LIKE"
  193. "DOES NOT SOUND LIKE"
  194.  
  195. Logical operators are (synonyms listed together on the same line):
  196.  
  197. ^, "NOT"
  198. &, "AND", "BUT"
  199. |, /, "OR"
  200.  
  201. The keyword SUBJECT is used to refer to the Subject: field in the
  202. mail header, and SENDER refers to the From: field.
  203.  
  204. Examples:
  205.  
  206. search * in activ-l where subject contains (peace or prosperity)
  207.    selects all articles with subject containing "peace" or "prosperity"
  208.  
  209. search (house or senate) and (vote) where sender is MATHRICH@UMCVMB.BITNET
  210.    selects articles posted by me (:-) which contain the string
  211.    "vote" and either "house" or "senate" (or both) in the message body.
  212.  
  213. search * where sender contains harel and subject does not contain peace
  214.    selects articles posted by Harel which don't have the word "peace"
  215.    in the subject.
  216.  
  217.  
  218. Search commands (or any other database command) which are too long
  219. to put on a single line can be continued to the next line by placing
  220. a dash at the end of the line:
  221.  
  222. search (chairs or history) and 'corn flakes' in activ-l since 90/12/01 -
  223. where sender contains (harel or winkel) and subject does not contain -
  224. 'peaches and cream'
  225.  
  226. Note:  To avoid ambiguity, quoted strings should not be broken up into
  227. separate lines.
  228.  
  229. *** INDEX COMMAND ***
  230.  
  231. Once you've selected the articles of interest using the SEARCH command,
  232. you can get a quick listing of what you've selected with the index
  233. command.  Index displays, in a tabular format, the item number, date,
  234. time, number of lines, and subject of every article selected.
  235. Unfortunately it doesn't display the sender.  The syntax is just:
  236.  
  237. INDEX
  238.  
  239. Note: don't confuse this INDEX command with the library index
  240. command mentioned above.  They're two separate things.
  241.  
  242. *** LIST COMMAND ***
  243.  
  244. This is an alternative to the index command which allows the user to
  245. customize which mail header fields to display.  The full syntax is
  246. explained in the original listserv documentation.  A convenient
  247. version of the list command (which displays the sender) is:
  248.  
  249. LIST #.5R0 DATE.8 SENDER.10 #RECS.5R SUBJECT.80
  250.  
  251. *** PRINT COMMAND ***
  252.  
  253. After you get back an index of your search and you've decided which
  254. articles you want, you can submit a new job to retrieve them (or if
  255. you're sure of what you're doing, you can retrieve them in the same job)
  256. The PRINT command with no arguments prints all the articles currently
  257. selected.  If you've already received an index listing, you can print
  258. articles by their item number (listed in the index).  Print will
  259. accept a list or range of item numbers of articles to print.
  260.  
  261. Examples:
  262.  
  263. PRINT
  264.  
  265. Prints all selected articles.
  266.  
  267. PRINT 236 352 772
  268.  
  269. Prints just those three articles.
  270.  
  271. PRINT 329-350
  272.  
  273. Prints all articles in the specified range.
  274.  
  275. Note:  If you submit a job to retrieve articles by item number (you
  276. would have to first get the item numbers by doing an index in a previous
  277. job), you need to re-select the activ-l database before you can do any
  278. printing.  The fastest way to do this is to preceed the print command
  279. with a "SEARCH * IN ACTIV-L".
  280.  
  281. Listserv places an upper limit on the total number of lines produced
  282. by one job.  If you exceed this limit an error message will be printed
  283. and your output will be truncated.  Just split up your prints into
  284. separate jobs if this happens.
  285.  
  286. *** FOR CMS AND VMS USERS ONLY ***
  287.  
  288. If you are on an IBM VM/CMS or DEC VAX/VMS system connected to BITNET,
  289. you can access the database interactively.  To do this, you first
  290. need to get a copy of the appropriate commands to run on your
  291. system.
  292.  
  293. On VM/CMS systems:
  294. TELL LISTSERV AT UMCVMB GET LDBASE EXEC
  295. TELL LISTSERV AT UMCVMB GET LSVIUCV MODULE
  296. After you receive these files, type LDBASE UMCVMB to start a session.
  297.  
  298. On VAX/VMS systems:
  299. SEND LISTSERV@UMCVMB GET LDBASE COM
  300. After you receive this file, type @LDBASE to install the program and
  301. display detailed instructions.
  302.  
  303. Notes:
  304.  
  305. The JCL commands listed at the top of this tutorial are not
  306. needed in interactive mode.  You can go right into your first SEARCH
  307. command.
  308.  
  309. There is a relatively small line limit per command on interactive
  310. output.  To get a large amount of data, you need to have it mailed to
  311. you as a file.  To do this, simply prefix the INDEX or PRINT command
  312. with the word SENDBACK:
  313.  
  314. SENDBACK PRINT 234 432
  315.  
  316. Would return the specified print output to you in a mail file.
  317.  
  318. *** (end) ***
  319.  
  320.