Index: trunk/ippTools/src/magicdstool.c
===================================================================
--- trunk/ippTools/src/magicdstool.c	(revision 21433)
+++ trunk/ippTools/src/magicdstool.c	(revision 23389)
@@ -242,5 +242,5 @@
 
         // create a new magicRun for this group
-        magicRunRow *run = magicRunRowAlloc(0, exp_id, "run", workdir, "dirty", label, dvodb, registered, 0);
+        magicRunRow *run = magicRunRowAlloc(0, exp_id, "new", workdir, "dirty", label, dvodb, registered, 0);
         if (!run) {
             psAbort("failed to alloc magicRun object");
@@ -320,10 +320,11 @@
     PXOPT_LOOKUP_STR(stage, config->args, "-stage", true, false);
     PXOPT_LOOKUP_STR(outroot, config->args, "-outroot", true, false);
+
+    // optional
     PXOPT_LOOKUP_STR(recoveryroot, config->args, "-recoveryroot", false, false);
     PXOPT_LOOKUP_BOOL(re_place, config->args, "-replace", false);
     PXOPT_LOOKUP_BOOL(remove, config->args, "-remove", false);
-
-    // optional
     PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
+    PXOPT_LOOKUP_STR(label, config->args, "-label", false, false);
 
     psS64 stage_id = 0, cam_id = 0;
@@ -337,8 +338,9 @@
             0,          // ID
             magic_id,
-            "run",      // state
+            "new",      // state
             stage,
             stage_id,
             cam_id,
+            label,
             outroot,
             recoveryroot,
@@ -396,5 +398,5 @@
     PXOPT_COPY_S64(config->args, where, "-magic_ds_id", "magic_ds_id", "==");
     PXOPT_COPY_S64(config->args, where, "-magic_id", "magic_id", "==");
-//    PXOPT_COPY_S64(config->args, where, "-exp_id", "exp_id", "==");
+    PXOPT_COPY_STR(config->args, where, "-label", "label", "==");
 
     PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
@@ -685,6 +687,6 @@
         psS64 magic_ds_id = psMetadataLookupS64(NULL, row, "magic_ds_id");
 
-        // set magicDSRun.state to 'stop'
-        if (!setmagicDSRunState(config, magic_ds_id, "stop")) {
+        // set magicDSRun.state to 'full'
+        if (!setmagicDSRunState(config, magic_ds_id, "full")) {
             psError(PS_ERR_UNKNOWN, false, "failed to change magicDSRun.state for magic_ds_id: %" PRId64,
                 magic_ds_id);
@@ -795,6 +797,6 @@
     // check that state is a valid string value
     if (!(
-            (strncmp(state, "run", 4) == 0)
-            || (strncmp(state, "stop", 5) == 0)
+            (strncmp(state, "new", 4) == 0)
+            || (strncmp(state, "full", 5) == 0)
         )
     ) {
