Index: trunk/ippTools/src/warptool.c
===================================================================
--- trunk/ippTools/src/warptool.c	(revision 10756)
+++ trunk/ippTools/src/warptool.c	(revision 10768)
@@ -233,4 +233,53 @@
     PS_ASSERT_PTR_NON_NULL(config, NULL);
 
+    bool status = false;
+    psString p4_id = psMetadataLookupStr(&status, config->args, "-p4_id");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -p4_id");
+        return false;
+    }
+    if (!p4_id) {
+        psError(PS_ERR_UNKNOWN, true, "-p4_id is required");
+        return false;
+    }
+
+    psString exp_tag = psMetadataLookupStr(&status, config->args, "-exp_tag");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -exp_tag");
+        return false;
+    }
+    if (!exp_tag) {
+        psError(PS_ERR_UNKNOWN, true, "-exp_tag 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;
+    }
+
+    // defaults to 0
+    psS32 p3_version = psMetadataLookupS32(&status, config->args, "-p3_version");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -p3_version");
+        return false;
+    }
+
+    // XXX need to validate the p4_id here
+    if (!p4InputImfileInsert(config->dbh, 
+            (psS32)atoi(p4_id),
+            exp_tag,
+            p3_version,
+            class_id
+        )) {
+        psError(PS_ERR_UNKNOWN, false, "database error");
+        return false;
+    }
+
     return true;
 }
