Index: /trunk/ippTools/src/pxinject.c
===================================================================
--- /trunk/ippTools/src/pxinject.c	(revision 10114)
+++ /trunk/ippTools/src/pxinject.c	(revision 10115)
@@ -26,4 +26,5 @@
 
 #include "pxtools.h"
+#include "pxtag.h"
 #include "pxinject.h"
 
@@ -69,15 +70,7 @@
 static bool newExpMode(pxConfig *config)
 {
+    PS_ASSERT_PTR_NON_NULL(config, false);
+
     bool status = 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 exp_id = psMetadataLookupStr(&status, config->args, "-exp_id");
     if (!status) {
@@ -136,7 +129,12 @@
     }
 
+    psString exp_tag = pxGenExpTag(config, exp_id);
+    if (!exp_tag) {
+        psError(PS_ERR_UNKNOWN, false, "database error");
+        return false;
+    }
 
     if (!newExpInsert(config->dbh,
-                (psU64)atoll(exp_tag),
+                exp_tag,
                 exp_id,
                 camera,
@@ -148,6 +146,36 @@
         ) {
         psError(PS_ERR_UNKNOWN, false, "database error");
-        return false;
-    }
+        psFree(exp_tag);
+        return false;
+    }
+
+    psMetadata *md = psMetadataAlloc();
+    if (!psMetadataAddStr(md, PS_LIST_TAIL, "exp_tag", 0, NULL, exp_tag)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag");
+        psFree(md);
+        psFree(exp_tag);
+        psFree(md);
+    }
+    psFree(exp_tag);
+
+    bool simple = false;
+    {
+        bool status = false;
+        simple = psMetadataLookupBool(&status, config->args, "-simple");
+        if (!status) {
+            psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -simple");
+            psFree(md);
+            return false;
+        }
+    }
+
+    // negate simple so the default is true
+    if (!ippdbPrintMetadata(stdout, md, !simple)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to print array");
+        psFree(md);
+        return false;
+    }
+
+    psFree(md);
 
     return true;
@@ -156,6 +184,7 @@
 static bool newImfileMode(pxConfig *config)
 {
+    PS_ASSERT_PTR_NON_NULL(config, false);
+
     bool status = false;
-
     psString exp_tag = psMetadataLookupStr(&status, config->args, "-exp_tag");
     if (!status) {
Index: /trunk/ippTools/src/pxinjectConfig.c
===================================================================
--- /trunk/ippTools/src/pxinjectConfig.c	(revision 10114)
+++ /trunk/ippTools/src/pxinjectConfig.c	(revision 10115)
@@ -42,6 +42,4 @@
     // -newExp
     psMetadata *newExpArgs = psMetadataAlloc();
-    psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-exp_tag",  0,
-        "define the exp_tag (required)", NULL);
     psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-exp_id",  0,
         "define the exp_id (required)", NULL);
@@ -56,4 +54,6 @@
     psMetadataAddS32(newExpArgs, PS_LIST_TAIL, "-imfiles",  0,
         "define the number of imfiles in this exp (required)", 0);
+    psMetadataAddBool(newExpArgs, PS_LIST_TAIL, "-simple",  0,
+        "use the simple output format", false);
 
     // -newImfile
