Index: trunk/pstamp/scripts/pstampparse.pl
===================================================================
--- trunk/pstamp/scripts/pstampparse.pl	(revision 27118)
+++ trunk/pstamp/scripts/pstampparse.pl	(revision 27122)
@@ -318,5 +318,5 @@
     my $roi_string;
 
-    # note values were insured to be numbers in validROI()
+    # note values were checked by the function validROI()
     my $x = $row->{CENTER_X};
     my $y = $row->{CENTER_Y};
@@ -324,15 +324,13 @@
     my $h = $row->{HEIGHT};
     my $coord_mask = $row->{COORD_MASK};
-    if ($x && ($x ne "null") && $y && ($y ne "null") && $w && ($w ne "null") && $h && ($h ne "null")) {
-        if ($coord_mask & $PSTAMP_CENTER_IN_PIXELS) {
-            $roi_string = "-pixcenter $x $y";
-        } else {
-            $roi_string = "-skycenter $x $y";
-        }
-        if ($coord_mask & $PSTAMP_RANGE_IN_PIXELS) {
-            $roi_string .= " -pixrange $w $h";
-        } else {
-            $roi_string .= " -arcrange $w $h";
-        }
+    if ($coord_mask & $PSTAMP_CENTER_IN_PIXELS) {
+        $roi_string = "-pixcenter $x $y";
+    } else {
+        $roi_string = "-skycenter $x $y";
+    }
+    if ($coord_mask & $PSTAMP_RANGE_IN_PIXELS) {
+        $roi_string .= " -pixrange $w $h";
+    } else {
+        $roi_string .= " -arcrange $w $h";
     }
 
@@ -725,4 +723,14 @@
         $job_type = $row->{JOB_TYPE};
         $rownum = $row->{ROWNUM};
+        $rownum = 0 if !defined $rownum;
+        if ($job_type) {
+            if (($job_type ne "stamp") and ($job_type ne "get_image")) {
+                print STDERR "invalid job type: $job_type found in row $rownum\n";
+                $job_type = "none";
+            }
+        } else {
+            print STDERR "undefined job type found in row $rownum\n";
+            $job_type = "none";
+        }
     } else {
         $job_type = "none";
