Index: /trunk/ippTools/src/pztool.c
===================================================================
--- /trunk/ippTools/src/pztool.c	(revision 6661)
+++ /trunk/ippTools/src/pztool.c	(revision 6662)
@@ -6,4 +6,5 @@
 static bool pendingMode(pxConfig *config);
 static bool copydoneMode(pxConfig *config);
+bool summitExpPrint(FILE *stream, summitExpRow *summitExp);
 
 int main(int argc, char **argv)
@@ -43,4 +44,43 @@
 {
     PS_ASSERT_PTR_NON_NULL(config, false);
+
+    psArray *summit = summitExpSelectRowObjects(config->dbh,
+        config->where, MAX_ROWS);
+    if (!summit) { 
+        psError(PS_ERR_UNKNOWN, false, "no summitExp rows found"); \
+        return false; 
+    } 
+
+    psArray *new = newExpSelectRowObjects(config->dbh,
+        config->where, MAX_ROWS);
+    if (!new) { 
+        psError(PS_ERR_UNKNOWN, false, "no newExp rows found"); \
+    } 
+
+    if (new) {
+        for (long i = 0; i < summit->n; i++) {
+            summitExpRow *summitExp = summit->data[i];
+            for (long j = 0; j < summit->n; j++) {
+                newExpRow *newExp = new->data[j];
+                if (strcmp(summitExp->exp_id, newExp->exp_id) == 0) {
+                    psArrayRemove(summit, summitExp);
+                    // dec the counter as the array just got shorter
+                    //and we don't want to skip elemnts
+                    i--;
+                    break;
+                }
+            }
+        }
+        psFree(new);
+    }
+
+    for (long i = 0; i < summit->n; i++) {
+        if (!summitExpPrint(stdout, summit->data[i])) {
+            psError(PS_ERR_UNKNOWN, false,"summitExpPrint() failed");
+            return false;
+        }
+    }
+
+    return true;
 }
 
@@ -54,2 +94,18 @@
     PS_ASSERT_PTR_NON_NULL(config, false);
 }
+
+bool summitExpPrint(FILE *stream, summitExpRow *summitExp)
+{
+    PS_ASSERT_PTR_NON_NULL(stream, false);
+    PS_ASSERT_PTR_NON_NULL(summitExp, false);
+
+    fprintf(stream, "%s %s %s %s %s\n",
+        summitExp->exp_id,
+        summitExp->camera,
+        summitExp->telescope,
+        summitExp->exp_type,
+        summitExp->uri
+    );
+
+    return true;
+}
