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;
 }
