Index: trunk/ippTools/src/p2searchPendingFrames.c
===================================================================
--- trunk/ippTools/src/p2searchPendingFrames.c	(revision 8062)
+++ trunk/ippTools/src/p2searchPendingFrames.c	(revision 8074)
@@ -62,7 +62,24 @@
     PS_ASSERT_PTR_NON_NULL(config, NULL);
 
-    psArray *exps = p2PendingExpSelectRowObjects(config->dbh,
-        config->where,
-        MAX_ROWS);
+    // exp_id is optional
+    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;
+    }
+
+    // search only based on exp_id -- either they specified it or not
+    psMetadata *where = NULL;
+    if (exp_id) {
+        where = psMetadataAlloc(); 
+        if (!psMetadataAddStr(where, PS_LIST_TAIL, "exp_id", 0, "==", exp_id)) {
+            psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id");
+            psFree(where);
+            return false;
+        }
+    } 
+    psArray *exps = p2PendingExpSelectRowObjects(config->dbh, where, MAX_ROWS);
+    psFree(where);
     if (!exps) {
         psError(PS_ERR_UNKNOWN, false, "no p2PendingExp rows found");
