Index: trunk/ippTools/src/pxinjectConfig.c
===================================================================
--- trunk/ippTools/src/pxinjectConfig.c	(revision 18336)
+++ trunk/ippTools/src/pxinjectConfig.c	(revision 18561)
@@ -45,41 +45,25 @@
     // -newExp
     psMetadata *newExpArgs = psMetadataAlloc();
-    psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-tmp_exp_name",  0,
-            "define the exp_name (required)", NULL);
-    psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-tmp_inst",  0,
-            "define the camera name (required)", NULL);
-    psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-tmp_telescope",  0,
-            "define the telescope name (required)", NULL);
-    psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-workdir",  0,
-            "define workdir (required)", 0);
-    psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-reduction",  0,
-            "define reduction class", NULL);
-    psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-dvodb",  0,
-            "define the dvodb for the next processing step", NULL);
-    psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-tess_id",  0,
-            "define the tess_id for the next processing step", NULL);
-    psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-end_stage",  0,
-            "define the end goal processing step", NULL);
-    psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-label",  0,
-            "define a label (carried to chip stage)", NULL);
-    psMetadataAddBool(newExpArgs, PS_LIST_TAIL, "-simple",  0,
-            "use the simple output format", false);
+    psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-tmp_exp_name",  0,            "define the exp_name (required)", NULL);
+    psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-tmp_inst",  0,            "define the camera name (required)", NULL);
+    psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-tmp_telescope",  0,            "define the telescope name (required)", NULL);
+    psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-workdir",  0,            "define workdir (required)", 0);
+    psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-reduction",  0,            "define reduction class", NULL);
+    psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-dvodb",  0,            "define the dvodb for the next processing step", NULL);
+    psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-tess_id",  0,            "define the tess_id for the next processing step", NULL);
+    psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-end_stage",  0,            "define the end goal processing step", NULL);
+    psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-label",  0,            "define a label (carried to chip stage)", NULL);
+    psMetadataAddBool(newExpArgs, PS_LIST_TAIL, "-simple",  0,            "use the simple output format", false);
 
     // -newImfile
     psMetadata *newImfileArgs = psMetadataAlloc();
-    psMetadataAddS64(newImfileArgs, PS_LIST_TAIL, "-exp_id",  0,
-            "define the exp_id (required)", 0);
-    psMetadataAddStr(newImfileArgs, PS_LIST_TAIL, "-tmp_class_id",  0,
-            "define the class ID (required)", NULL);
-    psMetadataAddStr(newImfileArgs, PS_LIST_TAIL, "-uri",  0,
-            "define the URI (required)", NULL);
+    psMetadataAddS64(newImfileArgs, PS_LIST_TAIL, "-exp_id",  0,            "define the exp_id (required)", 0);
+    psMetadataAddStr(newImfileArgs, PS_LIST_TAIL, "-tmp_class_id",  0,            "define the class ID (required)", NULL);
+    psMetadataAddStr(newImfileArgs, PS_LIST_TAIL, "-uri",  0,            "define the URI (required)", NULL);
 
     // -updatenewExp
     psMetadata *updatenewExpArgs = psMetadataAlloc();
-    psMetadataAddS64(updatenewExpArgs, PS_LIST_TAIL, "-exp_id",  0,
-            "define the exp_id (required)", 0);
-    psMetadataAddStr(updatenewExpArgs, PS_LIST_TAIL, "-state", 0,
-            "set state (required)", NULL);
-
+    psMetadataAddS64(updatenewExpArgs, PS_LIST_TAIL, "-exp_id",  0,            "define the exp_id (required)", 0);
+    psMetadataAddStr(updatenewExpArgs, PS_LIST_TAIL, "-state", 0,            "set state (required)", NULL);
 
     psMetadata *argSets = psMetadataAlloc();
@@ -101,92 +85,4 @@
     psFree(modes);
 
-    // setup search criterion
-#define addWhereStr(name) \
-{ \
-    psString str = NULL; \
-    bool status = false; \
-    if ((str = psMetadataLookupStr(&status, config->args, "-" #name))) { \
-        if (!psMetadataAddStr(config->where, PS_LIST_TAIL, #name, 0, "==", str)) {\
-            psError(PS_ERR_UNKNOWN, false, "failed to add item " #name); \
-            psFree(config); \
-            return NULL; \
-        } \
-    } \
-}
-
-    // generate SQL where clause
-    config->where = psMetadataAlloc();
-
-    addWhereStr(det_id);
-    {
-        int n = 0;
-        bool status = false;
-        if ((n = psMetadataLookupS32(&status, config->args, "-iteration"))) {
-            if (!psMetadataAddS32(config->where, PS_LIST_TAIL, "iteration", 0, "==", n)) {
-                psError(PS_ERR_UNKNOWN, false, "failed to add item iteration");
-                psFree(config);
-                return NULL;
-            }
-        }
-    }
-    addWhereStr(det_type);
-    addWhereStr(exp_id);
-    addWhereStr(class_id);
-    // convert '-inst' to 'camera'
-    {
-        psString str = NULL;
-        bool status = false;
-        if ((str = psMetadataLookupStr(&status, config->args, "-inst"))) {
-            if (!psMetadataAddStr(config->where, PS_LIST_TAIL, "camera", 0, "==", str)) {
-                psError(PS_ERR_UNKNOWN, false, "failed to add item camera");
-                psFree(config);
-                return NULL;
-            }
-        }
-    }
-    addWhereStr(telescope);
-    {
-        int n = 0;
-        bool status = false;
-        if ((n = psMetadataLookupS32(&status, config->args, "-imfiles"))) {
-            if (!psMetadataAddS32(config->where, PS_LIST_TAIL, "imfiles", 0, "==", n)) {
-                psError(PS_ERR_UNKNOWN, false, "failed to add item imfiles");
-                psFree(config);
-                return NULL;
-            }
-        }
-    }
-    addWhereStr(filter);
-    addWhereStr(stats);
-    addWhereStr(recipe);
-    {
-        int n = 0;
-        bool status = false;
-        if ((n = psMetadataLookupS32(&status, config->args, "-guide_version"))) {
-            if (!psMetadataAddS32(config->where, PS_LIST_TAIL, "guide_version", 0, "==", n)) {
-                psError(PS_ERR_UNKNOWN, false, "failed to add item guide_version");
-                psFree(config);
-                return NULL;
-            }
-        }
-    }
-    {
-        bool boolean = false;
-        bool status = false;
-
-        if ((boolean = psMetadataLookupBool(&status, config->args, "-accept"))) {
-            if (!psMetadataAddBool(config->where, PS_LIST_TAIL, "accept", 0, "==", boolean)) {
-                psError(PS_ERR_UNKNOWN, false, "failed to add item accept");
-                psFree(config);
-                return NULL;
-            }
-        }
-    }
-
-    if (config->where->list->n < 1) {
-        psFree(config->where);
-        config->where = NULL;
-    }
-
     // define Database handle, if used
     // do this last so we don't setup a connection before CLI options are
