Index: trunk/ippTasks/detrend.norm.pro
===================================================================
--- trunk/ippTasks/detrend.norm.pro	(revision 12368)
+++ trunk/ippTasks/detrend.norm.pro	(revision 12369)
@@ -175,4 +175,9 @@
     exec mkdir -p $outroot
 
+    $run = detrend_norm_calc.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE $ARGS
+    if ($WORKDIR != NULL)
+      $run = $run --workdir $outroot
+    end
+
     # save the pageName for future reference below
     options $pageName
@@ -180,7 +185,7 @@
     # create example job options as a demonstration
     if ($VERBOSE > 1)
-      echo command detrend_norm_calc.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE --workdir $outroot $ARGS
-    end
-    command detrend_norm_calc.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE --workdir $outroot $ARGS
+      echo command $run
+    end
+    command $run
   end
 
@@ -293,4 +298,9 @@
     exec mkdir -p $outroot
 
+    $run = detrend_norm_apply.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --value $NORM --input_uri $URI --camera $CAMERA --det_type $DET_TYPE $ARGS
+    if ($WORKDIR != NULL)
+      $run = $run --workdir $outroot
+    end
+    
     # save the pageName for future reference below
     options $pageName
@@ -298,7 +308,7 @@
     # create example job options as a demonstration
     if ($VERBOSE > 1)
-      echo command detrend_norm_apply.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --value $NORM --input_uri $URI --camera $CAMERA --det_type $DET_TYPE --workdir $outroot $ARGS
-    end
-    command detrend_norm_apply.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --value $NORM --input_uri $URI --camera $CAMERA --det_type $DET_TYPE --workdir $outroot $ARGS
+      echo command $run
+    end
+    command $run
   end
 
@@ -408,4 +418,9 @@
     exec mkdir -p $outroot
 
+    $run = detrend_norm_exp.pl --det_id $DET_ID --iteration $ITERATION --camera $CAMERA --det_type $DET_TYPE  $ARGS
+    if ($WORKDIR != NULL)
+      $run = $run --workdir $outroot
+    end
+
     # save the pageName for future reference below
     options $pageName
@@ -413,7 +428,7 @@
     # create example job options as a demonstration
     if ($VERBOSE > 1)
-      echo command detrend_norm_exp.pl --det_id $DET_ID --iteration $ITERATION --camera $CAMERA --det_type $DET_TYPE --workdir $outroot $ARGS
-    end
-    command detrend_norm_exp.pl --det_id $DET_ID --iteration $ITERATION --camera $CAMERA --det_type $DET_TYPE --workdir $outroot $ARGS
+      echo command $run
+    end
+    command $run
   end
 
