Index: /trunk/ippScripts/scripts/publish_file.pl
===================================================================
--- /trunk/ippScripts/scripts/publish_file.pl	(revision 24706)
+++ /trunk/ippScripts/scripts/publish_file.pl	(revision 24707)
@@ -39,9 +39,10 @@
 
 # Parse the command-line arguments
-my ( $pub_id, $camera, $stage, $stage_id, $format, $product, $workdir );
+my ( $pub_id, $exp_id, $camera, $stage, $stage_id, $format, $product, $workdir );
 my ( $dbname, $verbose, $no_update, $save_temps, $redirect );
 
 GetOptions(
     'pub_id=s'          => \$pub_id, # Publish identifier
+    'exp_id=s'          => \$exp_id, # Exposure identifier
     'camera=s'          => \$camera, # Camera name
     'stage=s'           => \$stage,       # Stage of interest
@@ -57,7 +58,8 @@
 
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
-pod2usage( -msg => "Required options: --pub_id --camera --stage --stage_id --product --workdir",
+pod2usage( -msg => "Required options: --pub_id --exp_id --camera --stage --stage_id --product --workdir",
            -exitval => $PS_EXIT_CONFIG_ERROR) unless
     defined $pub_id and
+    defined $exp_id and
     defined $camera and
     defined $product and
@@ -66,5 +68,5 @@
     defined $workdir;
 
-my $outroot = "$workdir/$product.$pub_id"; # Output root name
+my $outroot = "$workdir/$product.$pub_id.$exp_id"; # Output root name
 
 my $ipprc = PS::IPP::Config->new( $camera ) or
Index: /trunk/ippTasks/publish.pro
===================================================================
--- /trunk/ippTasks/publish.pro	(revision 24706)
+++ /trunk/ippTasks/publish.pro	(revision 24707)
@@ -161,4 +161,5 @@
     book getword publishRun $pageName stage -var STAGE
     book getword publishRun $pageName stage_id -var STAGE_ID
+    book getword publishRun $pageName exp_id -var EXP_ID
     book getword publishRun $pageName dbname -var DBNAME
 
@@ -169,5 +170,5 @@
     strsub $WORKDIR_TEMPLATE @HOST@ $default_host -var WORKDIR
 
-    $run = publish_file.pl --pub_id $PUB_ID --camera $CAMERA --workdir $WORKDIR --product $PRODUCT --stage $STAGE --stage_id $STAGE_ID --redirect-output
+    $run = publish_file.pl --pub_id $PUB_ID --exp_id $EXP_ID --camera $CAMERA --workdir $WORKDIR --product $PRODUCT --stage $STAGE --stage_id $STAGE_ID --redirect-output
     add_standard_args run
 
Index: /trunk/ippTools/share/pubtool_pending.sql
===================================================================
--- /trunk/ippTools/share/pubtool_pending.sql	(revision 24706)
+++ /trunk/ippTools/share/pubtool_pending.sql	(revision 24707)
@@ -10,5 +10,6 @@
         publishClient.workdir,
         diffRun.diff_id AS stage_id,
-        rawExp.camera
+        rawExp.camera,
+        rawExp.exp_id
     FROM publishRun
     JOIN publishClient USING(client_id)
@@ -33,5 +34,6 @@
         publishClient.workdir,
         camRun.cam_id AS stage_id,
-        rawExp.camera
+        rawExp.camera,
+        rawExp.exp_id
     FROM publishRun
     JOIN publishClient USING(client_id)
