Index: /trunk/ippTasks/detrend.norm.pro
===================================================================
--- /trunk/ippTasks/detrend.norm.pro	(revision 11545)
+++ /trunk/ippTasks/detrend.norm.pro	(revision 11546)
@@ -118,7 +118,6 @@
     end
 
-    # delete existing entries which are DONE
-    book delpage detPendingNormStatImfile -key state DONE
-    book delpage detPendingNormStatImfile -key state DATA_ERR
+    # delete existing entries in the appropriate states
+    process_cleanup detPendingNormStatImfile
   end
 
@@ -231,7 +230,6 @@
     end
 
-    # delete existing entries which are DONE
-    book delpage detPendingNormImfile -key state DONE
-    book delpage detPendingNormImfile -key state DATA_ERR
+    # delete existing entries in the appropriate states
+    process_cleanup detPendingNormImfile
   end
 
@@ -346,7 +344,6 @@
     end
 
-    # delete existing entries which are DONE
-    book delpage detPendingNormExp -key state DONE
-    book delpage detPendingNormExp -key state DATA_ERR
+    # delete existing entries in the appropriate states
+    process_cleanup detPendingNormExp
   end
 
Index: /trunk/ippTasks/detrend.process.pro
===================================================================
--- /trunk/ippTasks/detrend.process.pro	(revision 11545)
+++ /trunk/ippTasks/detrend.process.pro	(revision 11546)
@@ -105,7 +105,6 @@
     end
 
-    # delete existing entries which are DONE
-    book delpage detPendingProcessedImfile -key state DONE
-    book delpage detPendingProcessedImfile -key state DATA_ERR
+    # delete existing entries in the appropriate states
+    process_cleanup detPendingProcessedImfile
   end
 
@@ -220,7 +219,6 @@
     end
 
-    # delete existing entries which are DONE
-    book delpage detPendingProcessedExp -key state DONE
-    book delpage detPendingProcessedExp -key state DATA_ERR
+    # delete existing entries in the appropriate states
+    process_cleanup detPendingProcessedExp
   end
 
Index: /trunk/ippTasks/detrend.reject.pro
===================================================================
--- /trunk/ippTasks/detrend.reject.pro	(revision 11545)
+++ /trunk/ippTasks/detrend.reject.pro	(revision 11546)
@@ -86,7 +86,6 @@
     end
 
-    # delete existing entries which are DONE
-    book delpage detRejectExp -key state DONE
-    book delpage detRejectExp -key state DATA_ERR
+    # delete existing entries in the appropriate states
+    process_cleanup detRejectExp
   end
 
Index: /trunk/ippTasks/detrend.resid.pro
===================================================================
--- /trunk/ippTasks/detrend.resid.pro	(revision 11545)
+++ /trunk/ippTasks/detrend.resid.pro	(revision 11546)
@@ -102,7 +102,6 @@
     end
 
-    # delete existing entries which are DONE
-    book delpage detPendingResidImfile -key state DONE
-    book delpage detPendingResidImfile -key state DATA_ERR
+    # delete existing entries in the appropriate states
+    process_cleanup detPendingResidImfile
   end
 
@@ -219,7 +218,6 @@
     end
 
-    # delete existing entries which are DONE
-    book delpage detPendingResidExp -key state DONE
-    book delpage detPendingResidExp -key state DATA_ERR
+    # delete existing entries in the appropriate states
+    process_cleanup detPendingResidExp
   end
 
Index: /trunk/ippTasks/detrend.stack.pro
===================================================================
--- /trunk/ippTasks/detrend.stack.pro	(revision 11545)
+++ /trunk/ippTasks/detrend.stack.pro	(revision 11546)
@@ -87,7 +87,6 @@
     end
 
-    # delete existing entries which are DONE
-    book delpage detPendingStackedImfile -key state DONE
-    book delpage detPendingStackedImfile -key state DATA_ERR
+    # delete existing entries in the appropriate states
+    process_cleanup detPendingStackedImfile
   end
 
Index: /trunk/ippTasks/pantasks.pro
===================================================================
--- /trunk/ippTasks/pantasks.pro	(revision 11545)
+++ /trunk/ippTasks/pantasks.pro	(revision 11546)
@@ -239,2 +239,17 @@
   book setword $bookName $pageName state UNKNOWN_ERR
 end
+
+## XXX for the moment, remove all errors
+macro process_cleanup
+  if ($0 != 2)
+    echo "USAGE: process_cleanup (bookname)"
+    break
+  end
+
+  book delpage $1 -key state DONE
+  book delpage $1 -key state SYS_ERR
+  book delpage $1 -key state DATA_ERR
+  book delpage $1 -key state PROG_ERR
+  book delpage $1 -key state CONFIG_ERR
+  book delpage $1 -key state UNKNOWN_ERR
+end
Index: /trunk/ippTasks/phase0.pro
===================================================================
--- /trunk/ippTasks/phase0.pro	(revision 11545)
+++ /trunk/ippTasks/phase0.pro	(revision 11546)
@@ -105,7 +105,6 @@
     end
 
-    # delete existing entries which are DONE or DATAERR
-    book delpage p0PendingImfile -key state DONE
-    book delpage p0PendingImfile -key state DATA_ERR
+    # delete existing entries in the appropriate states
+    process_cleanup p0PendingImfile
   end
 
@@ -216,7 +215,6 @@
     end
 
-    # delete existing entries which are DONE
-    book delpage p0PendingExp -key state DONE
-    book delpage p0PendingExp -key state DATA_ERR
+    # delete existing entries in the appropriate states
+    process_cleanup p0PendingExp
   end
 
Index: /trunk/ippTasks/phase2.pro
===================================================================
--- /trunk/ippTasks/phase2.pro	(revision 11545)
+++ /trunk/ippTasks/phase2.pro	(revision 11546)
@@ -86,7 +86,6 @@
     end
 
-    # delete existing entries which are DONE
-    book delpage p2PendingImfile -key state DONE
-    book delpage p2PendingImfile -key state DATA_ERR
+    # delete existing entries in the appropriate states
+    process_cleanup p2PendingImfile
   end
 
Index: /trunk/ippTasks/phase3.pro
===================================================================
--- /trunk/ippTasks/phase3.pro	(revision 11545)
+++ /trunk/ippTasks/phase3.pro	(revision 11546)
@@ -64,7 +64,6 @@
     end
 
-    # delete existing entries which are DONE
-    book delpage p3PendingExp -key state DONE
-    book delpage p3PendingExp -key state DATA_ERR
+    # delete existing entries in the appropriate states
+    process_cleanup p3PendingExp
   end
 
