Index: /trunk/ippTasks/chip.pro
===================================================================
--- /trunk/ippTasks/chip.pro	(revision 16207)
+++ /trunk/ippTasks/chip.pro	(revision 16208)
@@ -150,4 +150,6 @@
     stdout $logfile
     stderr $logfile
+    dirname $logfile -var outpath
+    mkdir $outpath
 
     $run = chip_imfile.pl --exp_id $EXP_ID --chip_id $CHIP_ID --class_id $CLASS_ID --exp_tag $EXP_TAG --uri $URI --camera $CAMERA --outroot $outroot
Index: /trunk/ippTasks/detrend.norm.pro
===================================================================
--- /trunk/ippTasks/detrend.norm.pro	(revision 16207)
+++ /trunk/ippTasks/detrend.norm.pro	(revision 16208)
@@ -157,5 +157,5 @@
 
     # specify choice of local or remote host based on camera and chip (class_id)
-    set.host.for.camera $camera FPA
+    set.host.for.camera $CAMERA FPA
 
     # set workdir (interpolate host; see camera.pro for examples)
@@ -171,4 +171,6 @@
     stdout $logfile
     stderr $logfile
+    dirname $logfile -var outpath
+    mkdir $outpath
 
     $run = detrend_norm_calc.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE --outroot $outroot
@@ -274,5 +276,5 @@
 
     # specify choice of local or remote host based on camera and chip (class_id)
-    set.host.for.camera $camera $class_id
+    set.host.for.camera $CAMERA $CLASS_ID
 
     # set workdir (interpolate host; see camera.pro for examples)
@@ -288,4 +290,6 @@
     stdout $logfile
     stderr $logfile
+    dirname $logfile -var outpath
+    mkdir $outpath
 
     $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 --outroot $outroot
@@ -388,5 +392,5 @@
 
     # specify choice of local or remote host based on camera and chip (class_id)
-    set.host.for.camera $camera FPA
+    set.host.for.camera $CAMERA FPA
 
     # set workdir (interpolate host; see camera.pro for examples)
@@ -402,4 +406,6 @@
     stdout $logfile
     stderr $logfile
+    dirname $logfile -var outpath
+    mkdir $outpath
 
     $run = detrend_norm_exp.pl --det_id $DET_ID --iteration $ITERATION --camera $CAMERA --det_type $DET_TYPE  --outroot $outroot
Index: /trunk/ippTasks/detrend.process.pro
===================================================================
--- /trunk/ippTasks/detrend.process.pro	(revision 16207)
+++ /trunk/ippTasks/detrend.process.pro	(revision 16208)
@@ -148,5 +148,5 @@
 
     # specify choice of local or remote host based on camera and chip (class_id)
-    set.host.for.camera $camera $class_id
+    set.host.for.camera $CAMERA $CLASS_ID
 
     # see chip.pro for examples
@@ -165,4 +165,6 @@
     stdout $logfile
     stderr $logfile
+    dirname $logfile -var outpath
+    mkdir $outpath
 
     $run = detrend_process_imfile.pl --det_id $DET_ID --exp_id $EXP_ID --det_type $DET_TYPE --class_id $CLASS_ID --exp_tag $EXP_TAG --input_uri $URI --camera $CAMERA --outroot $outroot
@@ -270,5 +272,5 @@
 
     # specify choice of local or remote host based on camera and chip (class_id)
-    set.host.for.camera $camera FPA
+    set.host.for.camera $CAMERA FPA
 
     # set workdir (interpolate host; see camera.pro for examples)
@@ -287,4 +289,6 @@
     stdout $logfile
     stderr $logfile
+    dirname $logfile -var outpath
+    mkdir $outpath
 
     $run = detrend_process_exp.pl --det_id $DET_ID --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --outroot $outroot
Index: /trunk/ippTasks/detrend.reject.pro
===================================================================
--- /trunk/ippTasks/detrend.reject.pro	(revision 16207)
+++ /trunk/ippTasks/detrend.reject.pro	(revision 16208)
@@ -126,5 +126,5 @@
 
     # specify choice of local or remote host based on camera and chip (class_id)
-    set.host.for.camera $camera FPA
+    set.host.for.camera $CAMERA FPA
 
     # set workdir (interpolate host; see camera.pro for examples)
@@ -140,4 +140,6 @@
     stdout $logfile
     stderr $logfile
+    dirname $logfile -var outpath
+    mkdir $outpath
 
     $run = detrend_reject_exp.pl --det_id $DET_ID --iteration $ITERATION --det_type $DET_TYPE --camera $CAMERA --outroot $outroot
Index: /trunk/ippTasks/detrend.resid.pro
===================================================================
--- /trunk/ippTasks/detrend.resid.pro	(revision 16207)
+++ /trunk/ippTasks/detrend.resid.pro	(revision 16208)
@@ -148,5 +148,5 @@
 
     # specify choice of local or remote host based on camera and chip (class_id)
-    set.host.for.camera $camera $class_id
+    set.host.for.camera $CAMERA $CLASS_ID
 
     # set workdir (interpolate host; see camera.pro for examples)
@@ -165,4 +165,6 @@
     stdout $logfile
     stderr $logfile
+    dirname $logfile -var outpath
+    mkdir $outpath
 
     $run = detrend_resid.pl --det_id $DET_ID --iteration $ITERATION --exp_id $EXP_ID --exp_tag $EXP_TAG --class_id $CLASS_ID --det_type $DET_TYPE --detrend $DET_URI --input_uri $URI --camera $CAMERA --mode $MODE --outroot $outroot
@@ -272,5 +274,5 @@
 
     # specify choice of local or remote host based on camera and chip (class_id)
-    set.host.for.camera $camera FPA
+    set.host.for.camera $CAMERA FPA
 
     # set workdir (interpolate host; see camera.pro for examples)
@@ -289,4 +291,6 @@
     stdout $logfile
     stderr $logfile
+    dirname $logfile -var outpath
+    mkdir $outpath
 
     $run = detrend_reject_imfile.pl --det_id $DET_ID --iteration $ITERATION --exp_id $EXP_ID --exp_tag $EXP_TAG --det_type $DET_TYPE --camera $CAMERA --outroot $outroot
Index: /trunk/ippTasks/detrend.stack.pro
===================================================================
--- /trunk/ippTasks/detrend.stack.pro	(revision 16207)
+++ /trunk/ippTasks/detrend.stack.pro	(revision 16208)
@@ -128,5 +128,5 @@
 
     # specify choice of local or remote host based on camera and chip (class_id)
-    set.host.for.camera $camera $class_id
+    set.host.for.camera $CAMERA $CLASS_ID
 
     # set workdir (interpolate host; see camera.pro for examples)
@@ -145,4 +145,6 @@
     stdout $logfile
     stderr $logfile
+    dirname $logfile -var outpath
+    mkdir $outpath
 
     $run = detrend_stack.pl --det_id $DET_ID --iteration $ITERATION --class_id $CLASS_ID --det_type $DET_TYPE --camera $CAMERA --outroot $outroot
Index: /trunk/ippTasks/pantasks.pro
===================================================================
--- /trunk/ippTasks/pantasks.pro	(revision 16207)
+++ /trunk/ippTasks/pantasks.pro	(revision 16208)
@@ -23,4 +23,15 @@
 # is only used if DB:n is 0
 $DB:n = 0
+
+if ($NEBULOUS)
+ $default_host     = anyhost
+ $default_volume   = none
+ # $default_host     = ipp004
+ # $workdir_template = neb:///@HOST@-v0
+ # $default_volume   = ipp004-v0
+ # $volume_template  = 
+else
+ $default_host     = anyhost
+end
 
 # user function to add databases by name (avoids duplicates)
@@ -359,7 +370,7 @@
 
   if ("$host" == "NULL")
-    strsub $template @HOST@ $default -var $$varname
+    strsub $template @HOST@ $default -var $varname
   else
-    strsub $template @HOST@ $host -var $$varname
+    strsub $template @HOST@ $host -var $varname
   end
 end
@@ -392,10 +403,10 @@
   end
 
-  strsub $template @HOST@ $host -var $$varname
-end
-
-macro set.host.by.camera
+  strsub $template @HOST@ $host -var $varname
+end
+
+macro set.host.for.camera
   if ($0 != 3)
-    echo "USAGE: set.host.by.camera (camera) (class_id)"
+    echo "USAGE: set.host.for.camera (camera) (class_id)"
     break
   end
@@ -407,5 +418,5 @@
 
   # missing camera and/or chiphosts table results in host = NULL
-  book getword chiphosts $1 $2 -var $host
+  book getword chiphosts $1 $2 -var host
 
   if ("$host" == "NULL")
Index: /trunk/ippTasks/register.pro
===================================================================
--- /trunk/ippTasks/register.pro	(revision 16207)
+++ /trunk/ippTasks/register.pro	(revision 16208)
@@ -159,5 +159,5 @@
     # neb:///ipp004-vol0/gpc1/20080130
 
-    ## generate output log based on filerule
+    ## generate output logfile name and convert URI to a PATH
     sprintf logfile "%s/%s/%s.%s.reg.log" $WORKDIR $EXP_TAG $EXP_TAG $TMP_CLASS_ID
     $logfile = `ipp_datapath.pl $logfile`
@@ -165,4 +165,9 @@
     stdout $logfile
     stderr $logfile
+    dirname $logfile -var outpath
+    mkdir $outpath
+
+    # add mkdir back here?
+    # or make part of reigster_imfile.pl?
 
     $run = register_imfile.pl --exp_id $EXP_ID --tmp_class_id $TMP_CLASS_ID --tmp_exp_name $TMP_EXP_NAME --uri $URI
@@ -281,4 +286,6 @@
     stdout $logfile
     stderr $logfile
+    dirname $logfile -var outpath
+    mkdir $outpath
 
     $run = register_exp.pl --exp_id $EXP_ID --exp_tag $EXP_TAG
Index: /trunk/ippTasks/summit.copy.pro
===================================================================
--- /trunk/ippTasks/summit.copy.pro	(revision 16207)
+++ /trunk/ippTasks/summit.copy.pro	(revision 16208)
@@ -279,5 +279,5 @@
         book getword pzPendingImfile $pageName camera -var $CAMERA
 
-        set.host.by.camera $CAMERA $CLASS_ID
+        set.host.for.camera $CAMERA $CLASS_ID
         host        anyhost
 
