LSTSRV-L Archives

LISTSERV Site Administrators' Forum

LSTSRV-L

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
"M. Erixon-Stanford, Internet Coordinator" <[log in to unmask]>
Wed, 16 Oct 1996 16:24:30 EDT
text/plain (194 lines)
Here's how we do it:
   LISTSERV CGI is the program that runs on the mainframe (uses pipes).
   Calling program uses standard html.  I've included the
   table that brings in the listserv logs at the bottom of
   the note.  Buzz back if things are unclear.  Mignon 202-357-4243.
---8<-----------8<--------------8<-------------8<----------
 
/* LISTSERV CGI
 *
 *         Use: Retrieve list of LISTSERV logs
 *              and present to client.
 *      Author: Ray Mrohs, Smithsonian Institution
 *        Date: 1996-Mar-26
 *      Tinker-er: Mignon,  4-15-96
 */
 
/********* INITIALIZE VARIABLES FOR USE IN THIS SCRIPT ***************/
   ok = 1            /* if ok ends up as 0 do not run request */
   s_type = ''
   lognam = ''
   logtyp = ''
   illegal = '!/|?'  /* list of characters that might confuse pipes */
   cfm = 'L'         /* file mode of the LISTSERV log* disk */
 
/********* CREATE TOP OF HTML FORM ***********************************/
   'OUTPUT' "<html>"
   address "COMMAND" 'GLOBALV SELECT HTTPD GET VRM'
   'OUTPUT' "<!CMS HTTPD" vrm "LISTSERV CGI>"
   'OUTPUT' '<body bgcolor="#FFFFFF">'
   'OUTPUT' '<center>'
   'OUTPUT' '<h3>Notelogs from the SIVM LISTSERV Database</h3>'
   'OUTPUT' '<HR>'
   'OUTPUT' '</center>'
 
/********* READ INCOMING STRINGS AND ASSIGN VARIABLE VALUES **********/
   do while 1
      'READTO RECORD'
      if rc <> 0 then leave
      parse value record with str1 '=' str2
      upper str1
      upper str2
      select
         when str1 = 'ST'     then s_type = strip(str2)
         when str1 = 'LOGNAM' then lognam = strip(str2)
         when str1 = 'LOGTYP' then logtyp = strip(str2)
         otherwise ok = 0
      end
   end
 
/********* CHECK FOR ILLEGAL CHARACTERS, KILL REQUEST IF PRESENT *****/
   if ok then do
      if verify(illegal,lognam,m) > 0 then ok = 0
      if verify(illegal,logtyp,m) > 0 then ok = 0
   end
 
/********* SELECT WHICH ROUTINE BASED ON OK AND SEARCH TYPE **********/
   select                                                   /*  arg1  */
      when ok & s_type = 'LIST'     then call GETLIST
      when ok & s_type = 'LOG'      then call GETLOG
      otherwise
      'OUTPUT' 'Invalid request - Reload request form and try again.'
   end                                              /*  Select  arg1  */
 
ENDALL:
   'OUTPUT' '<hr>'
   'OUTPUT' '<a href="http://sivm.si.edu/~irmss907/index.html#lsvtable">
   Return to table of discussion groups</a> <P>'
   'OUTPUT' '<a href="http://www.si.edu">Go to SI Home page</a>'
   'OUTPUT' '</body>'
   'OUTPUT' '</html>'
   exit
 
/********* SUB-ROUTINE AREA ; REQUEST AND FORMATTING HAPPENS HERE ****/
 
GETLIST:
   'OUTPUT' '<h4>List of available log files:</h4>'
   'OUTPUT' '<pre>'
 
   'CALLPIPE',
     'CMS LISTFILE' lognam 'LOG*' cfm '(NOH DATE' ,
     '| specs $<a href=LISTSERV?ST=LOG&LOGNAM=$ 1 w1 next',
     '$&LOGTYP=$ next w2 next $>$ next  w1-2 next $</a>$ next',
     '$-$ nextw w6 nextw $lines$ nextw $<br>$ next',
     '| *:'
 
   'OUTPUT' '</pre>'
   return
 
GETLOG:
   'OUTPUT' '<pre>'
 
   'CALLPIPE',
     '<' lognam logtyp cfm,
     '| *:'
 
   'OUTPUT' '</pre>'
   return
 
------8<------------8<-------------8<-------------8<----------
(Table within HTML document that calls the LISTSERV CGI program.)
 
The following discussion groups are hosted by the [log in to unmask]
To see the notelogs, click on the name of the discussion group.
<P>
 
<table border>
<tr>
<td><a href="/~irmss907/listserv?st=list&lognam=aerosp-l">
AEROSP-L</a></td>
   <td>Aeronautics & Aerospace History</td>
 
<td><a href="/~irmss907/listserv?st=list&lognam=apevents">
APEVENTS</a></td>
   <td> News from Woodrow Wilson Center's Asia Program</td>
</tr>
 
<tr>
<td><a href="/~irmss907/listserv?st=list&lognam=biocis-l">
BIOCIS-L</a></td>
   <td>Biology Curriculum Innovation Study</td>
<td><a href="/~irmss907/listserv?st=list&lognam=conslink">
CONSLINK</a></td>
   <td>CONSLINK - The Conservation Network</td>
</tr>
 
<tr>
<td><a href="/~irmss907/listserv?st=list&lognam=fedcsg">
FEDCSG</a></td>
   <td>Federal Agencies Customer Service Group</td>
<td><a href="/~irmss907/listserv?st=list&lognam=folio-l">
FOLIO-L</a></td>
   <td>List for Folio Views Users</td>
</tr>
 
<tr>
<td><a href="/~irmss907/listserv?st=list&lognam=htech-l">
HTECH-L</a></td>
   <td>History of Technology Discussion</td>
<td><a href="/~irmss907/listserv?st=list&lognam=mammal-l">
MAMMAL-L</a></td>
   <td>Mammalian Biology</td>
</tr>
 
<tr>
<td><a href="/~irmss907/listserv?st=list&lognam=matbi-l">
MATBI-L</a></td>
   <td>Marine All Taxa Biological Inventories
<td><a href="/~irmss907/listserv?st=list&lognam=nasmnews">
NASMNEWS</a></td>
   <td>National Air & Space Museum (NASM) Events at the Smithsonian</td>
</tr>
 
<tr>
<td><a href="/~irmss907/listserv?st=list&lognam=palclime">
PALCLIME</a></td>
   <td>Paleoclimate, Paleoecology for late Mesozoic & early Cenozoic
    periods </td>
<td><a href="/~irmss907/listserv?st=list&lognam=shothc-l">
SHOTHC-L</a></td>
   <td>History of Computing Issues</td>
</tr>
 
<tr>
<td><a href="/~irmss907/listserv?st=list&lognam=siem-l">
SIEM-L</a></td>
   <td>Exchange Ideas on Producing Exhibitions</td>
<td><a href="/~irmss907/listserv?st=list&lognam=sirff-l">
SIRFF-L</a></td>
   <td>Ecology and Economics Seminar Series</td>
</tr>
 
<tr>
<td><a href="/~irmss907/listserv?st=list&lognam=teachart">
TEACHART</a></td>
<td>NMAA Art Curriculum Teacher Conference</td>
<td><a href="/~irmss907/listserv?st=list&lognam=worgnet">
WORGNET</a></td>
<td>Women in Ornithology Resource Group</td>
</tr>
 
 
<tr>
<td><a href="/~irmss907/listserv?st=list&lognam=zib-bits">
ZIB-BITS</a></td>
<td>SI Exhibit Designers Computer Group</td>
<td><a href="/~irmss907/listserv?st=list&lognam=zoognus">
ZOOGNUS</a></td>
<td>News from the National Zoological Park, Washington, DC</td>
</tr>
</table>
<P>
 
------8<---------8<-------------8<--------------8<---------

ATOM RSS1 RSS2