Index: /branches/eam_branch_20080109/ippTasks/pantasks.pro
===================================================================
--- /branches/eam_branch_20080109/ippTasks/pantasks.pro	(revision 16170)
+++ /branches/eam_branch_20080109/ippTasks/pantasks.pro	(revision 16171)
@@ -1,4 +1,5 @@
 
 # XXX make these upper-case
+$NEBULOUS = 0
 $network = 1
 $parallel = 1
@@ -346,18 +347,23 @@
   end
 
-  if (not($parallel))
-    ???
-    return
-  end
-
   # missing camera and/or chiphosts table results in host = NULL
   book getword chiphosts $1 $2 -var $host
 
+  if ($NEBULOUS)
+    if ("$host" == "NULL")
+      $workdir = $workdir_default
+      $volume  = "NULL"
+      return
+    end
+    strsub $workdir_template @HOST@ $host -var workdir
+    strsub $volume_template @HOST@ $host -var volume
+    return
+  end
+
   if ("$host" == "NULL")
-    ???
-    return
-  end
-
-  $workdir = /data/$host.0
+    $workdir = $workdir_default
+    return
+  end
+  strsub $workdir_template @HOST@ $host -var workdir
 end
 
Index: /branches/eam_branch_20080109/ippTasks/summit.copy.pro
===================================================================
--- /branches/eam_branch_20080109/ippTasks/summit.copy.pro	(revision 16170)
+++ /branches/eam_branch_20080109/ippTasks/summit.copy.pro	(revision 16171)
@@ -7,7 +7,15 @@
 # pztool -adddatastore -inst allskycam -telescope ps1 -uri  http://otis1.ifa.hawaii.edu/ds/allskycam/index.txt
 
-# XXX these things below need to be set in pantasks.pro, perhaps with a site-dependent call.
+# the templates are used if we have a class_id/host relationship; if none is found, the default values are used
 # XXX not sure how to handle the .N value if we need to use more than one
-$workdir_template = /data/@HOST@.0/
+if ($NEBULOUS)
+ $workdir_default  = neb://
+ $workdir_template = neb://
+ $volume_default  = ipp004-v0
+ $volume_template = @HOST@-v0
+else
+ $workdir_default  = /data/ipp004.0/
+ $workdir_template = /data/@HOST@.0/
+end
 
 $VERBOSE = 1
@@ -267,9 +275,12 @@
 
         # we need to set the workdir based on 1) nebulous or not? 2) chip/host relationship
-       	set.workdir.by.camera $CAMERA $CLASS_ID /data/@HOST@.0
+        # this function uses workdir_template, workdir_default, volume_template, volume_default,
+        # it sets workdir and volume
+       	set.workdir.by.camera $CAMERA $CLASS_ID
 
         # figure out filename
 	# XXXX this filename needs to use nebulous names
         $FILENAME = $workdir/$CAMERA/$YEAR/$MONTH/$DAY/$EXP_NAME/$EXP_NAME.$CLASS_ID.fits
+        $FILEROOT = $workdir/$CAMERA/$YEAR/$MONTH/$DAY/$EXP_NAME/$EXP_NAME.$CLASS_ID
 
         book setword pzPendingImfile $pageName filename $FILENAME
@@ -280,9 +291,12 @@
         # store the pageName with this job
         options $pageName
-
-        if ($MD5SUM == 0) 
-            $run = dsget --uri $URI --filename $FILENAME --bytes $BYTES 
-        else
-            $run = dsget --uri $URI --filename $FILENAME --bytes $BYTES --md5 $MD5SUM
+        options $FILEROOT
+
+        $run = dsget --uri $URI --filename $FILENAME --bytes $BYTES 
+        if ($MD5SUM) 
+            $run = $run --md5 $MD5SUM
+        end
+        if ($NEBULOUS && ("$volname" != "NULL")) 
+            $run = $run --volume $volume
         end
 
@@ -304,6 +318,10 @@
         book getword pzPendingImfile $options:0 filename -var FILENAME
 
+	# we need to set the values of tess_id, dvodb, end_stage, workdir here 
+        # these are functions of (at least) EXP_TYPE and SURVEY_ID, both of which should come from the data store
+
 	# update the database with the success
-        $run = pztool -copydone -exp_name $EXP_NAME -inst $CAMERA -telescope $TELESCOPE -class $CLASS -class_id $CLASS_ID -uri $FILENAME
+        $run = pztool -copydone -exp_name $EXP_NAME -inst $CAMERA -telescope $TELESCOPE -class $CLASS -class_id $CLASS_ID -uri $FILENAME -workdir $options:1
+	# tess_id, dvodb, workdir, end_stage
 
         # create the command line
