Index: trunk/ippTools/src/pzgetexp.c
===================================================================
--- trunk/ippTools/src/pzgetexp.c	(revision 15091)
+++ trunk/ippTools/src/pzgetexp.c	(revision 16170)
@@ -69,24 +69,8 @@
     PS_ASSERT_PTR_NON_NULL(config, NULL);
 
-    bool status = false;
-    psString camera = psMetadataLookupStr(&status, config->args, "-inst");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -inst");
-        return false;
-    }
-    if (!camera) {
-        psError(PS_ERR_UNKNOWN, true, "-inst is required");
-        return false;
-    }
-
-    psString telescope = psMetadataLookupStr(&status, config->args, "-telescope");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -telescope");
-        return false;
-    }
-    if (!telescope) {
-        psError(PS_ERR_UNKNOWN, true, "-telescope is required");
-        return false;
-    }
+    // required
+    PXOPT_LOOKUP_STR(camera, config->args, "-inst", true, false);
+    PXOPT_LOOKUP_STR(telescope, config->args, "-telescope", true, false);
+    PXOPT_LOOKUP_STR(uri, config->args, "-uri", true, false);
 
     // find last fileset/exp_name (if we have one)
@@ -119,5 +103,4 @@
     // invoke dsproductls
     // dsproductls --uri <> --last_fileset <>
-    psString uri = psMetadataLookupStr(&status, config->args, "-uri");
     psString cmd = NULL;
     if (haveLastFileSet) {
@@ -275,15 +258,7 @@
     // these are constants for all records parsed -- look them up before we do
     // any work
-    bool status = false;
-    char *camera = psMetadataLookupStr(&status, config->args, "-inst");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, false, "failed to lookup item '-inst'");
-        return NULL;
-    }
-    char *telescope = psMetadataLookupStr(&status, config->args, "-telescope");
-    if (!status) {
-        psError(PS_ERR_UNKNOWN, false, "failed to lookup item '-telescope'");
-        return NULL;
-    }
+    // required
+    PXOPT_LOOKUP_STR(camera, config->args, "-inst", true, false);
+    PXOPT_LOOKUP_STR(telescope, config->args, "-telescope", true, false);
 
     // split the string into lines
