Index: /trunk/ippTools/src/pxinject.c
===================================================================
--- /trunk/ippTools/src/pxinject.c	(revision 8011)
+++ /trunk/ippTools/src/pxinject.c	(revision 8012)
@@ -77,5 +77,6 @@
         return false;
     }
-    psString exp_type = psMetadataLookupStr(&status, config->args, "-exp_type");    if (!status) {
+    psString exp_type = psMetadataLookupStr(&status, config->args, "-exp_type");
+    if (!status) {
         psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -exp_type");
         return false;
@@ -105,4 +106,48 @@
 static bool newImfileMode(pxConfig *config)
 {
+    bool status = false;
+
+    psString exp_id = psMetadataLookupStr(&status, config->args, "-exp_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -exp_id");
+        return false;
+    }
+    if (!exp_id) {
+        psError(PS_ERR_UNKNOWN, true, "-exp_id is required");
+        return false;
+    }
+    psString class = psMetadataLookupStr(&status, config->args, "-class");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -class");
+        return false;
+    }
+    if (!class) {
+        psError(PS_ERR_UNKNOWN, true, "-class is required");
+        return false;
+    }
+    psString class_id = psMetadataLookupStr(&status, config->args, "-class_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -class_id");
+        return false;
+    }
+    if (!class_id) {
+        psError(PS_ERR_UNKNOWN, true, "-class_id is required");
+        return false;
+    }
+    psString uri = psMetadataLookupStr(&status, config->args, "-uri"); 
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -uri");
+        return false;
+    }
+    if (!uri) {
+        psError(PS_ERR_UNKNOWN, true, "-uri is required");
+        return false;
+    }
+
+    if (!newImfileInsert(config->dbh, exp_id, class, class_id, uri)) {
+        psError(PS_ERR_UNKNOWN, false, "database error");
+        return false;
+    }
+
     return true;
 }
Index: /trunk/ippTools/src/pxinjectConfig.c
===================================================================
--- /trunk/ippTools/src/pxinjectConfig.c	(revision 8011)
+++ /trunk/ippTools/src/pxinjectConfig.c	(revision 8012)
@@ -38,12 +38,10 @@
     psMetadataAddStr(newImfileArgs, PS_LIST_TAIL, "-exp_id",  0,
         "define the exp_id (required)", NULL);
-    psMetadataAddStr(newImfileArgs, PS_LIST_TAIL, "-inst",  0,
-        "define the camera name (required)", NULL);
-    psMetadataAddStr(newImfileArgs, PS_LIST_TAIL, "-telescope",  0,
-        "define the telescope name (required)", NULL);
-    psMetadataAddStr(newImfileArgs, PS_LIST_TAIL, "-exp_type",  0,
-        "define the type of exposure (required)", NULL);
-    psMetadataAddS32(newImfileArgs, PS_LIST_TAIL, "-imfiles",  0,
-        "define the number of imfiles in this exp (required)", 0);
+    psMetadataAddStr(newImfileArgs, PS_LIST_TAIL, "-class",  0,
+        "define the class (required)", NULL);
+    psMetadataAddStr(newImfileArgs, PS_LIST_TAIL, "-class_id",  0,
+        "define the class ID (required)", NULL);
+    psMetadataAddStr(newImfileArgs, PS_LIST_TAIL, "-uri",  0,
+        "define the URI (required)", NULL);
 
 #define PXTOOL_MODE(option, modeval, argset) \
