Index: trunk/ippTasks/camera.pro
===================================================================
--- trunk/ippTasks/camera.pro	(revision 16173)
+++ trunk/ippTasks/camera.pro	(revision 16195)
@@ -122,5 +122,5 @@
     book getword camPendingExp $pageName exp_tag -var EXP_TAG
     book getword camPendingExp $pageName cam_id -var CAM_ID
-    book getword camPendingExp $pageName workdir -var WORKDIR
+    book getword camPendingExp $pageName workdir -var WORKDIR_TEMPLATE
     book getword camPendingExp $pageName dvodb  -var DVODB
     book getword camPendingExp $pageName dbname -var DBNAME
@@ -130,25 +130,26 @@
     set.host.for.camera $camera FPA
 
-    # output log from filerule
-    if ("$WORKDIR" == "NULL")
-      $outpath = `pwd`
-    else
-      $outpath = `ipp_datapath.pl $WORKDIR`
-    end
-    sprintf outpath "%s/%s" $outpath $EXP_TAG
-    sprintf outroot "%s/%s.cm.%s" $outpath $EXP_TAG $CAM_ID
+    # raw workdir examples:
+    # file://data/@HOST@.0/gpc1/20080130
+    # neb:///@HOST@-vol0/gpc1/20080130 (need to supply volname?, or are we re-defining this each time?)
+    set.workdir.by.camera $CAMERA FPA $WORKDIR_TEMPLATE $default_host WORKDIR
+    # out workdir examples:
+    # file://data/ipp004.0/gpc1/20080130
+    # neb:///ipp004-vol0/gpc1/20080130
+
+    ## generate outroot specific to this exposure (& chip)
+    sprintf outroot "%s/%s/%s.cm.%s" $WORKDIR $EXP_TAG $EXP_TAG $CAM_ID
+
+    ## generate output log based on filerule (convert the URI to a PATH)
     $logfile = `ipp_filename.pl --filerule LOG.EXP --camera $CAMERA --class_id NONE --basename $outroot`
     if ("$logfile" == "") 
-      $logfile = $outroot.log
+      echo "WARNING: logfile not defined in camera.pro:146"
+      break
     end
 
     stdout $logfile
     stderr $logfile
-    exec mkdir -p $outpath
 
-    $run = camera_exp.pl --exp_tag $EXP_TAG --cam_id $CAM_ID --camera $CAMERA
-    if ("$WORKDIR" != "NULL")
-      $run = $run --workdir $WORKDIR
-    end
+    $run = camera_exp.pl --exp_tag $EXP_TAG --cam_id $CAM_ID --camera $CAMERA --outroot $outroot
     if ("$REDUCTION" != "NULL")
       $run = $run --reduction $REDUCTION
