From:	ADVAX::"mcnc!VM1.NoDak.EDU!dittman%SKBAT.CSC.TI.COM" "Eric Dittman"  3-MAY-1991 19:19:44.43
To:	Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
CC:	
Subj:	How to fix duplicate article problem

Received: by ADVAX.DECnet (utk-mail11 v1.5) ; Fri, 3 May 91 19:19:22 EDT
Received:  from mcnc by ge-dab.GE.COM (5.61/GE-DAB 1.15) with UUCP
	id AA17662 for ; Fri, 3 May 91 18:15:11 -0400
Received: from VM1.NoDak.EDU by mcnc.mcnc.org (5.59/MCNC/3-21-91)
	id AA22616; Fri, 3 May 91 17:05:15 -0400
	for ARISIA.DNET.ge.com!EVERHART
Message-Id: <9105032105.AA22616@mcnc.mcnc.org>
Received: from NDSUVM1.BITNET by VM1.NoDak.EDU (IBM VM SMTP R1.2.1MX) with BSMTP id 9163; Fri, 03 May 91 16:04:03 CDT
Received: from NDSUVM1.BITNET by NDSUVM1.BITNET (Mailer R2.07) with BSMTP id
 0616; Fri, 03 May 91 16:04:02 CDT
Date:         Fri, 3 May 91 02:10:56 GMT
Reply-To: Eric Dittman <mcnc!VM1.NoDak.EDU!dittman%SKBAT.CSC.TI.COM>
Sender: ANU-NEWS Discussion <ANU-NEWS@VM1.NoDak.EDU>
From: Eric Dittman <mcnc!VM1.NoDak.EDU!dittman%SKBAT.CSC.TI.COM>
Subject:      How to fix duplicate article problem
To: Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
 
At the end of this file is the list of changes I made to REBUILD_ITEM_FILE
to allow rebuilding NEWS.ITEMS when you have the duplicate article problem
that has been discussed the last couple of days.  Originally I was renaming
the duplicates to .DUP, but Geoff pointed out that this could rename files
that shouldn't be in some cases.  Also, Bob Sloane pointed out the missing
parameter on one of the printf calls.  The other change is very minor.
 
Here is how I rebuilt my NEWS.ITEMS:
 
1)  Stop anything that will want to access any of the files, including
    your NNTP server.  You don't want the item database changing behind
    REBUILD_ITEM_FILE's back.
 
2)  Define the symbol to execute REBUILD_ITEM_FILE.
 
    i.e.,  $ REBUILD_ITEM_FILE :== $NEWS_ROOT:REBUILD_ITEM_FILE
 
3)  Run REBUILD_ITEM_FILE and specify a new item file.
 
    i.e., $ REBUILD_ITEM_FILE NEWS_ROOT:NEW_NEWS.ITEMS
 
4)  While the rebuild is running (on my MicroVAX II this took a few hours),
    apply the patch Geoff posted yesterday to prevent the reoccurence of
    the problem (otherwise, you're just spinning your wheels).
 
5)  Do a skim from NEWS (make sure you've installed the new version of
    NEWS!).
 
6)  Enable the NNTP server and anything else you disabled in step 1.
 
If you try this, let me know if you have any problems.  If you have any
suggestions for changes to REBUILD_ITEM_FILE that make make this faster
in the future, let me know.
--
Eric Dittman
Texas Instruments - Component Test Facility
dittman@skitzo.csc.ti.com
dittman@skbat.csc.ti.com
 
Disclaimer:  I don't speak for Texas Instruments or the Component Test
             Facility.  I don't even speak for myself.
 
************
File DA:[DITTMAN.REBUILD]REBUILD_ITEM_FILE.C;23
  203       if (!(++item_count % 100)) printf("%d\r",item_count);
  204
******
File DA:[DITTMAN.REBUILD]REBUILD_ITEM_FILE.C;20
  203       if (!(++item_count % 100)) printf("%d\r");
  204
************
************
File DA:[DITTMAN.REBUILD]REBUILD_ITEM_FILE.C;23
  258           if (status != RMS$_DUP) {
  259             printf("\tPUT returned VMS error:\n");
  260             lib$signal(status);
  261             }
  262           }
  263         }
******
File DA:[DITTMAN.REBUILD]REBUILD_ITEM_FILE.C;20
  258           printf("\tPUT returned VMS error:\n");
  259           lib$signal(status);
  260           }
  261         }
************
