Index: trunk/ippScripts/scripts/phase3.pl
===================================================================
--- trunk/ippScripts/scripts/phase3.pl	(revision 11110)
+++ trunk/ippScripts/scripts/phase3.pl	(revision 11297)
@@ -19,9 +19,10 @@
 use Pod::Usage qw( pod2usage );
 
-my ($exp_tag, $camera, $outpath, $no_update);
+my ($exp_tag, $camera, $outpath, $dbname, $no_update);
 GetOptions(
     'exp_tag|e=s'       => \$exp_tag,
     'camera|c=s'        => \$camera,
-    'outpath|o=s'   => \$outpath,
+    'outpath|o=s'       => \$outpath,
+    'dbname|d=s'        => \$dbname, # Database name
     'no-update'         => \$no_update
 ) or pod2usage( 2 );
@@ -52,4 +53,5 @@
 {
     my $command = "$p3tool -pendingimfile -exp_tag $exp_tag"; # Command to run
+    $command .= " -dbname $dbname" if defined $dbname;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
 	run(command => $command, verbose => 1);
@@ -149,4 +151,5 @@
 	"-bg $bg -bg_stdev $bg_stdev -bg_mean_stdev $bg_mean_stdev " .
 	"-sigma_ra 0.0 -sigma_dec 0.0 -nastro 0 -zp_mean 0.0 -zp_stdev 0.0"; # Command to run
+    $command .= " -dbname $dbname" if defined $dbname;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
 	run(command => $command, verbose => 1);
