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
Dennis Boone <[log in to unmask]>
Fri, 17 Feb 1995 14:09:02 EST
text/plain (95 lines)
On Thu, 16 Feb 1995 14:58:01 EST Ben Chi said:
>The only problem with this method is that LISTSERV may not have the
>disk accessed.  In that case, I suppose you could TELL LISTSERV CMS
>ACCESS nnn x .  Then ERASE, as you describe above, and finally nuke
>the database pointers which aren't any good any more:
>TELL LISTSERV CMS ERASE listname DBNAMES x
>TELL LISTSERV CMS ERASE listname DBINDEX x
>The next time someone does an LDBASE against the list these files will
>automatically be rebuilt.
 
For those of you with CMS PIPES, I use the following exec to purge logs.  The
SVCPSET and RSCPSET execs are homegrowns which save and restore CP SET
settings, so that I don't trash the environment.  I encourage the disk to be
accessed by doing a DB REFRESH early in the exec.  While this could
theoretically fail, it's been pretty reliable so far.
 
Dennis
-----------------------------------------------------------------------------
/* PURGELOG EXEC, BOONE, 11/08/94
   Purge logs from Listserv disks using various trickery */
 
/* Modifications:
   11/08/94 Boone      Initial coding
   End Modifications */
 
   address command
   parse arg listname logstowhack junk
 
   if (length(junk) ^= 0) | (length(listname) = 0) then do
      say 'usage: PURGELOG listname logstowhack'
      exit 1
   end
   if logstowhack = 0 then
      logstowhack = 1
 
   listname = translate(listname)
   me = userid()
 
   'EXEC SVCPSET'
   'CP SET MSG IUCV'
   'CP MSG LISTSERV DB REFRESH' listname
   'PIPE STARMSG |',
      'TOLABEL 00000001LISTSERV* Database' listname||'|',
      'CONS'
   say 'The available log files are:'
   'CP MSG LISTSERV CMS PIPE CMS L' listname 'LOG* * (DATE |',
      'SPEC /MSG' me ' / NEXT 1-* NEXT | CP'
   'PIPE STARMSG |',
      'TOLABEL 00000001LISTSERV* Return code|',
      'DROP FIRST 1 |',
      'LOCATE /00000001LISTSERV/ |',
      'SPEC 17-* NEXT |',
      'SORT |',
      'STEM files. |',
      'CONS'
   if files.0 = 0 then do
      say 'No log files currently available for list' listname
      signal exitgracefully
   end
   if files.0 < logstowhack then do
      say 'There are only' files.0 'logs on the disk'
      signal exitgracefully
   end
 
   say 'Ok to purge the following files?'
   do i=1 to logstowhack
      say '  ' files.i
   end
   say 'Enter Y or N:'
   parse upper pull ynresp
   if length(ynresp) = 0 then
      signal exitgracefully
   ynresp = substr(ynresp, 1, 1)
 
   if ynresp = 'Y' then do i=1 to logstowhack
      parse var files.i fn ft fm junk
      'CP MSG LISTSERV CMS SENDFILE' fn ft fm me
      'PIPE STARMSG |',
         'TOLABEL 00000001LISTSERV* Return code|',
         'SPEC 17-* NEXT |',
         'CONS'
      'CP MSG LISTSERV CMS ERASE' fn ft fm
      'PIPE STARMSG |',
         'TOLABEL 00000001LISTSERV* Return code|',
         'SPEC 17-* NEXT |',
         'CONS'
   end
 
   'CP MSG LISTSERV DB REFRESH' listname
 
exitgracefully:
 
   'EXEC RSCPSET'
-----------------------------------------------------------------------------

ATOM RSS1 RSS2