Index: trunk/ippTools/src/pxchip.c
===================================================================
--- trunk/ippTools/src/pxchip.c	(revision 25800)
+++ trunk/ippTools/src/pxchip.c	(revision 25835)
@@ -192,44 +192,4 @@
 }
 
-bool pxchipRunSetLabel(pxConfig *config, psS64 chip_id, const char *label)
-{
-    PS_ASSERT_PTR_NON_NULL(config, false);
-    // note label == NULL should be explicitly allowed
-
-    char *query = "UPDATE chipRun SET label = '%s' WHERE chip_id = %" PRId64;
-    if (!p_psDBRunQueryF(config->dbh, query, label, chip_id)) {
-        psError(PS_ERR_UNKNOWN, false,
-                "failed to change state for chip_id %" PRId64, chip_id);
-        return false;
-    }
-
-    return true;
-}
-
-
-bool pxchipRunSetLabelByQuery(pxConfig *config, psMetadata *where, const char *label)
-{
-    PS_ASSERT_PTR_NON_NULL(config, false);
-    // note label == NULL should be explicitly allowed
-
-    psString query = psStringCopy("UPDATE chipRun JOIN rawExp USING(exp_id) SET label = '%s'");
-
-    if (where && psListLength(where->list) > 0) {
-        psString whereClause = psDBGenerateWhereSQL(where, NULL);
-        psStringAppend(&query, " %s", whereClause);
-        psFree(whereClause);
-    }
-
-    if (!p_psDBRunQueryF(config->dbh, query, label)) {
-        psFree(query);
-        psError(PS_ERR_UNKNOWN, false, "database error");
-        return false;
-    }
-
-    psFree(query);
-
-    return true;
-}
-
 bool pxchipProcessedImfileSetStateByQuery(pxConfig *config, psMetadata *where, const char *state)
 {
@@ -276,9 +236,12 @@
                          const char *workdir,
                          const char *label,
+                         const char *data_group,
+                         const char *dist_group,
                          const char *reduction,
                          const char *expgroup,
                          const char *dvodb,
                          const char *tess_id,
-                         const char *end_stage)
+                         const char *end_stage,
+                         const char *note)
 {
     PS_ASSERT_PTR_NON_NULL(config, false);
@@ -298,4 +261,6 @@
             "dirty",    // workdir_state
             label,
+            data_group,
+            dist_group,
             reduction,
             expgroup,
@@ -303,5 +268,6 @@
             tess_id,
             end_stage,
-            0           // magicked
+            0,          // magicked
+            note
             )
     ) {
