Index: trunk/ippTools/src/regtoolConfig.c
===================================================================
--- trunk/ippTools/src/regtoolConfig.c	(revision 18336)
+++ trunk/ippTools/src/regtoolConfig.c	(revision 18561)
@@ -50,10 +50,4 @@
     // -pendingimfile
     psMetadata *pendingimfileArgs = psMetadataAlloc();
-// support for this options is unimplemented
-#if 0
-    ADD_OPT(Str,  pendingimfileArgs, "-exp_id",    "search by exposure ID", NULL);
-    ADD_OPT(Str,  pendingimfileArgs, "-class",     "search by class",       NULL);
-    ADD_OPT(Str,  pendingimfileArgs, "-class_id",  "search by class ID",    NULL);
-#endif
     ADD_OPT(U64,  pendingimfileArgs, "-limit",     "limit result set to N items",  0);
     ADD_OPT(Bool, pendingimfileArgs, "-simple",    "use the simple output format", false);
@@ -68,8 +62,10 @@
     ADD_OPT(Str,  addprocessedimfileArgs, "-class_id",       "define class ID (required)",         NULL);
     ADD_OPT(Str,  addprocessedimfileArgs, "-uri",            "define URI (required)",             NULL);
+
     ADD_OPT(Str,  addprocessedimfileArgs, "-exp_type",       "define exposure type",             NULL);
     ADD_OPT(Str,  addprocessedimfileArgs, "-filelevel",      "define filelevel",             NULL);
     ADD_OPT(Str,  addprocessedimfileArgs, "-filter",         "define filter ",                 NULL);
     ADD_OPT(Str,  addprocessedimfileArgs, "-comment",        "define comment ",             NULL);
+
     ADD_OPT(F32,  addprocessedimfileArgs, "-airmass",        "define airmass",                 NAN);
     ADD_OPT(F64,  addprocessedimfileArgs, "-ra",             "define RA",                 NAN);
@@ -94,4 +90,5 @@
     ADD_OPT(F32,  addprocessedimfileArgs, "-m2_tip",         "define M2 TIP position",                NAN);
     ADD_OPT(F32,  addprocessedimfileArgs, "-m2_tilt",        "define M2 TILT position",         NAN);
+
     ADD_OPT(F32,  addprocessedimfileArgs, "-env_temperature","define Environmental Temperature",     NAN);
     ADD_OPT(F32,  addprocessedimfileArgs, "-env_humidity",   "define Environmental Humidity",         NAN);
@@ -139,11 +136,4 @@
     // -pendingexp
     psMetadata *pendingexpArgs = psMetadataAlloc();
-// support for these options in unimplemented
-#if 0
-    psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-exp_id",   0,        "search by exposure ID", NULL);
-    psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-inst",     0,        "search by camera", NULL);
-    psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-telescope",0,        "search by telescope", NULL);
-    psMetadataAddStr(pendingexpArgs, PS_LIST_TAIL, "-exp_type", 0,        "search by exposure type", NULL);
-#endif
     psMetadataAddU64(pendingexpArgs, PS_LIST_TAIL, "-limit",    0,        "limit result set to N items", 0);
     psMetadataAddBool(pendingexpArgs, PS_LIST_TAIL, "-simple",  0,        "use the simple output format", false);
@@ -156,7 +146,8 @@
     psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-telescope",        0,        "define the telescope name (required)", NULL);
     psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-exp_tag",          0,        "define the external exposure tag name (required)", NULL);
+    psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-filelevel",        0,        "define the data partitioning level of this file (required)", NULL);
+
     psMetadataAddTime(addprocessedexpArgs, PS_LIST_TAIL, "-dateobs",         0,        "define observation time", NULL);
     psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-exp_type",         0,        "define exposure type", NULL);
-    psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-filelevel",        0,        "define the data partitioning level of this file", NULL);
     psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-workdir",          0,        "define the \"default\" workdir for this exposure", NULL);
     psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-dvodb",            0,        "define the dvodb for the next processing step", NULL);
@@ -208,8 +199,4 @@
     psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-hostname",         0,        "define host name", NULL);
     psMetadataAddS16(addprocessedexpArgs, PS_LIST_TAIL, "-code",             0,        "set fault code", 0);
-    /*
-    psMetadataAddStr(updateArgs, PS_LIST_TAIL, "-recip",  0,        "define URL", NULL);
-    psMetadataAddStr(updateArgs, PS_LIST_TAIL, "-mosiac",  0,        "define URL", NULL);
-    */
 
     // -processedexp
@@ -297,62 +284,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(PXTOOLS_ERR_PROG, false, "failed to add item " #name); \
-            psFree(config); \
-            return NULL; \
-        } \
-    } \
-}
-
-    // generate SQL where clause
-    config->where = psMetadataAlloc();
-
-    addWhereStr(exp_id);
-    addWhereStr(exp_name);
-    // 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(PXTOOLS_ERR_PROG, false, "failed to add item camera");
-                psFree(config);
-                return NULL;
-            }
-        }
-    }
-
-    addWhereStr(telescope);
-    addWhereStr(exp_type);
-    addWhereStr(class);
-    addWhereStr(class_id);
-    addWhereStr(tmp_class_id);
-    addWhereStr(filter);
-
-    // convert '-code' to 'fault'
-    {
-        psS16 fault = 0;
-        bool status = false;
-        if ((fault = psMetadataLookupS16(&status, config->args, "-code"))) {
-            if (!psMetadataAddS16(config->where, PS_LIST_TAIL, "fault", 0, "==", fault)) {
-                psError(PS_ERR_UNKNOWN, false, "failed to add item fault");
-                psFree(config);
-                return NULL;
-            }
-        }
-    }
-
-    if (config->where->list->n < 1) {
-        psFree(config->where);
-        config->where = NULL;
-    }
-
-
     // define Database handle, if used
     config->dbh = psMemIncrRefCounter(pmConfigDB(config->modules));
