Index: trunk/ippToPsps/perl/checkOdmStatus.pl
===================================================================
--- trunk/ippToPsps/perl/checkOdmStatus.pl	(revision 29301)
+++ trunk/ippToPsps/perl/checkOdmStatus.pl	(revision 29648)
@@ -20,4 +20,6 @@
 my $filePath = undef;
 my $removeUnprocessed = undef;
+my $onlyCheckUndeleted = undef;
+my $onlyCheckMergeWorthy = undef;
 
 
@@ -28,4 +30,6 @@
         'product|p=s' => \$product,
         'location|l=s' => \$filePath,
+        'onlyundeleted|u' => \$onlyCheckUndeleted,
+        'onlymergeworthy|m' => \$onlyCheckMergeWorthy,
         'remove|r' => \$removeUnprocessed,
         'verbose|v' => \$verbose,
@@ -49,4 +53,12 @@
 if (!defined $filePath) {
     print "* OPTIONAL: location for files to be deleted    -l <path>\n";
+}
+if (!defined $onlyCheckMergeWorthy) {
+    $onlyCheckMergeWorthy = 0;
+    print "* OPTIONAL: only check merge worthy batches     -m                   (default = $onlyCheckMergeWorthy)\n";
+}
+if (!defined $onlyCheckUndeleted) {
+    $onlyCheckUndeleted = 0;
+    print "* OPTIONAL: only check undeleted batches        -u                   (default = $onlyCheckUndeleted)\n";
 }
 if (!defined $removeUnprocessed) {
@@ -117,4 +129,6 @@
 
         if (!$onDatastore) {next;}
+        if ($onlyCheckUndeleted && $deleted) {next;}
+        if ($onlyCheckMergeWorthy && !$mergeWorthy) {next;}
 
         my $batch = ippToPsps::Batch->existing(
@@ -212,5 +226,5 @@
 
     my ($tempFile, $tempName) = tempfile( "/tmp/ippToPsps_odmXml.XXXX", UNLINK => !$save_temps);
-    #print $response->content. "\n";
+    if ($verbose) {print $response->content. "\n";}
     print $tempFile $response->content;
     close($tempFile);
@@ -253,4 +267,5 @@
     ${$merged} = 0;
 
+    if ($result =~ m/None/) { ${$loadedToOdm} = 1;}
     if ($result =~ m/LoadStarted/) { ${$loadedToOdm} = 1;}
     if ($result =~ m/MergeWorthy/) { ${$loadedToOdm} = 1; ${$mergeWorthy} = 1;}
