Index: /trunk/ippToPsps/scripts/ippToPsps_run.pl
===================================================================
--- /trunk/ippToPsps/scripts/ippToPsps_run.pl	(revision 27728)
+++ /trunk/ippToPsps/scripts/ippToPsps_run.pl	(revision 27729)
@@ -12,5 +12,5 @@
 
 # globals
-my ($verbose, $save_temps, $no_op, $no_update, $camera, $product, $output, $dvodb, $label, $singleExpId, $no_publish);
+my ($verbose, $save_temps, $no_op, $no_update, $camera, $product, $output, $dvodb, $datastoreProduct, $label, $singleExpId, $no_publish);
 
 # TODO temporary until we use database to store current jobid
@@ -26,4 +26,5 @@
 $output = undef;
 $singleExpId = undef;
+$datastoreProduct = "PSPS_test";
 
 # get user args
@@ -34,4 +35,5 @@
         'label|l=s' => \$label,
         'expid|e=s' => \$singleExpId,
+        'dsproduct|s=s' => \$datastoreProduct,
         'no_publish' => \$no_publish,
         'verbose|v' => \$verbose,
@@ -129,4 +131,6 @@
             ORDER BY rawExp.exp_id ASC
 SQL
+            #AND camRun.dist_group LIKE 'sas'
+            #AND rawExp.decl >= '-0.157079633' AND rawExp.decl <= '0.157079633' Jims Dec range
     }
     else {
@@ -137,6 +141,4 @@
 SQL
     }
-
-    if ($verbose) { print"* $query\n";}
 
     my $batchId = 0;
@@ -221,4 +223,6 @@
         print "*\n*******************************************************************************\n\n";
     }
+
+    $db->disconnect();
 
     return 1;
@@ -549,5 +553,5 @@
     $command .= " --datapath $fullJobPath";
     $command .= " --type IPP_PSPS";
-    $command .= " --product PSPS_test";
+    $command .= " --product $datastoreProduct";
     $command .= " --list $tempName";
 
