I had occasion several times recently to determine for a given list
how many subscribers were using each of the delivery options. I put
together the following little pipe to do the job and thought others
might find it useful as well. When executed, the displayed results are:
liststat piporg-l stats
DIGEST 285
INDEX 71
MAIL 514
NOMAIL 226
TOTAL: 1096
Ready; T=1.11/1.15 16:51:04
The EXEC itself is:
------------------------------------------------------------------------
/* To get a count of MAIL, NOMAIL, DIGEST and INDEX settings of all the
subscribers of a given list, send mail to LISTSERV saying
Q <listname> FOR * , receive the reply into a file, and call the follow--
ing EXEC with the file-id as argument. Note that for purposes of these
totals NOMAIL overrides DIGEST or INDEX should a user have them both
set. */
ARG fileid
"PIPE (END !) <" fileid,
"| SPEC 1-6 1",
"| CHANGE /Subscr/%/",
"| a: FIND %"||,
"| f: FANINANY",
"| JOIN *",
"| SPLIT AT /%/",
"| g: NLOCATE /NOMAIL/",
"| h: FANINANY",
"| SORT COUNT",
"| SPEC 11-16 1 6-10 8",
"| CONSOLE",
"| SPEC 8-12 1",
"| STEM count.",
"! g: | SPEC /NOMAIL/ 1 | h:",
"! a: | b: FIND NOMAIL| f:",
"! b: | c: FIND MAIL| f:",
"! c: | d: FIND INDEX| f:",
"! d: | FIND DIGEST| f:"
c = 0; DO i = 1 TO count.0; c = c + count.i; END
SAY "TOTAL: "RIGHT(c,5)
EXIT
|