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
"Mark R. Williamson" <[log in to unmask]>
Wed, 29 May 1991 10:24:34 CDT
text/plain (42 lines)
Here's what I sent to the first questioner:
 
I added a local command to our LISTSERV.  The addition itself was not
difficult.  Add a line to LOCALCMD FILE containing the name of your
local command (which _must_ start with a non-alphabetic character),
the length of the minimum abbreviation, and the name of an EXEC that
is to be called when the command is issued.  Here is our entire
LOCALCMD FILE:
------------------- LOCALCMD FILE starts on next line ------------------
$MACARCH 4 $MACARCH
/FORWARD 5 LSV$FWDC
/CLINIC  6 $CLINIC
/PWPAGE  6 $PWPAGE
/LMON 3 LSV$LMNC
/WHOIS   4 LSV$WHO
/REGISTER 4 $REGISTR
------------------- LOCALCMD FILE ends on previous line ----------------
 
The first one is mine.  The first $MACARCH is the name of the command
the user would send to LISTSERV, "4" is the length of the minimum
abbreviation (saying $MAC, $MACA, $MACAR, $MACARC, and $MACARCH should
invoke this command), and the second $MACARCH indicates that $MACARCH
EXEC should be called to implement the command.  The other entries
are for "local" commands implemented by others (Eric, in some cases).
 
You can look at any existing LISTSERV command to determine the parms
passed.  If you like, I can send you a copy of $MACARCH EXEC, but it
is somewhat complicated due to its use of existing LISTSERV commands
(mostly GET, so I didn't have to rewrite it and its subroutines).
If your EXEC will just call an existing program and display its
results, you may not need to call existing commands, but you will
need to know how to invoke LISTSERV service routines (such as the
ones to return results to the user).
 
I hope this helps.  Feel free to write back if you have further
questions.  As noted above, there are others active in writing
LISTSERV extension commands, so if one of them also responds and
you prefer to ask him or her instead, that's OK too.
 
Mark R. Williamson, Rice University, Houston, TX; [log in to unmask]
Coordinating BITNET redistribution of Info-Mac archive files from Rice.

ATOM RSS1 RSS2