Index: trunk/pstamp/scripts/pstampparse.pl
===================================================================
--- trunk/pstamp/scripts/pstampparse.pl	(revision 36011)
+++ trunk/pstamp/scripts/pstampparse.pl	(revision 36017)
@@ -212,4 +212,14 @@
 }
 
+if (!$rows) {
+    # pstamp_job_run was invoked so the request file must have contained a valid header
+    # We can only assume that the file is invalid or more likely empty. The print above will let the
+    # log file know. Insert a faulted fake job and exit successfully.
+    print STDERR "Invalid request file.\n";
+    insertFakeJobForRow(undef, 0, $PSTAMP_INVALID_REQUEST);
+    exit 0;
+}
+
+
 my $nRows = scalar @$rows;
 print "\n$nRows rows read from request file\n";
@@ -385,5 +395,5 @@
     }
 
-    if (($req_type eq "byexp") and ($stage eq "stack" or $stage eq 'stack_summary') {
+    if (($req_type eq "byexp") and ($stage eq "stack" or $stage eq 'stack_summary')) {
         print STDERR "byexp not implemented for $stage stage. row: $rownum\n";
         insertFakeJobForRow($row, 1, $PSTAMP_NOT_IMPLEMENTED);
