Index: trunk/ippTools/src/pztool.c
===================================================================
--- trunk/ippTools/src/pztool.c	(revision 30352)
+++ trunk/ippTools/src/pztool.c	(revision 30353)
@@ -47,4 +47,5 @@
 static bool advanceMode(pxConfig *config);
 
+static bool updatepzexpMode(pxConfig *config);
 static bool updatenewexpMode(pxConfig *config);
 
@@ -85,4 +86,5 @@
         MODECASE(PZTOOL_MODE_TOADVANCE, toadvanceMode);
         MODECASE(PZTOOL_MODE_ADVANCE, advanceMode);
+	MODECASE(PZTOOL_MODE_UPDATEPZEXP, updatepzexpMode);
         MODECASE(PZTOOL_MODE_UPDATENEWEXP, updatenewexpMode);
         default:
@@ -894,4 +896,5 @@
             || (strncmp(state, "stop", 5) == 0)
             || (strncmp(state, "reg", 4) == 0)
+	    || (strncmp(state, "drop", 5) == 0)
         )
     ) {
@@ -910,4 +913,20 @@
 }
 
+static bool updatepzexpMode(pxConfig *config)
+{
+  PS_ASSERT_PTR_NON_NULL(config, false);
+  PXOPT_LOOKUP_STR(exp_name, config->args, "-exp_name", true, false);
+  PXOPT_LOOKUP_STR(camera,   config->args, "-camera",   true, false);
+  PXOPT_LOOKUP_STR(telescope,config->args, "-telescope",true, false);
+  PXOPT_LOOKUP_STR(state,    config->args, "-set_state",true, false);
+
+  if (!pzDownloadExpSetState(config,exp_name,camera,telescope,state)) {
+    psError(PS_ERR_UNKNOWN, false, "failed to change state for %s:%s:%s", exp_name, camera, telescope);
+    return false;
+  }
+  return true;
+}
+  
+  
 static bool updatenewexpMode(pxConfig *config)
 {
@@ -952,4 +971,6 @@
 
 
+
+
 #if 0
 static psArray *pzArrayAddArray(psArray *array, psArray *input)
Index: trunk/ippTools/src/pztool.h
===================================================================
--- trunk/ippTools/src/pztool.h	(revision 30352)
+++ trunk/ippTools/src/pztool.h	(revision 30353)
@@ -37,4 +37,5 @@
     PZTOOL_MODE_TOADVANCE,
     PZTOOL_MODE_ADVANCE,
+    PZTOOL_MODE_UPDATEPZEXP,
     PZTOOL_MODE_UPDATENEWEXP,
 } pztoolMode;
Index: trunk/ippTools/src/pztoolConfig.c
===================================================================
--- trunk/ippTools/src/pztoolConfig.c	(revision 30352)
+++ trunk/ippTools/src/pztoolConfig.c	(revision 30353)
@@ -156,4 +156,11 @@
     psMetadataAddStr(advanceArgs, PS_LIST_TAIL, "-label",  0,     "define the label for the chip stage", NULL);
 
+    // -updatepzexp
+    psMetadata *updatepzexpArgs = psMetadataAlloc();
+    psMetadataAddStr(updatepzexpArgs, PS_LIST_TAIL, "-exp_name",   0,            "search by exposure name (required)", NULL);
+    psMetadataAddStr(updatepzexpArgs, PS_LIST_TAIL, "-camera",     0,            "search by camera (required)", NULL);
+    psMetadataAddStr(updatepzexpArgs, PS_LIST_TAIL, "-telescope",  0,            "search by telescope (required)", NULL);
+    psMetadataAddStr(updatepzexpArgs, PS_LIST_TAIL, "-set_state",  0,            "define new state (required)", NULL);
+    
     // -updatenewexp
     psMetadata *updatenewexpArgs = psMetadataAlloc();
@@ -178,4 +185,5 @@
     PXOPT_ADD_MODE("-toadvance",          "", PZTOOL_MODE_TOADVANCE,    toadvanceArgs);
     PXOPT_ADD_MODE("-advance",          "", PZTOOL_MODE_ADVANCE,    advanceArgs);
+    PXOPT_ADD_MODE("-updatepzexp",     "", PZTOOL_MODE_UPDATEPZEXP, updatepzexpArgs);
     PXOPT_ADD_MODE("-updatenewexp",    "", PZTOOL_MODE_UPDATENEWEXP,updatenewexpArgs);
 
