Index: /trunk/pstamp/test/pstamp_req_create
===================================================================
--- /trunk/pstamp/test/pstamp_req_create	(revision 24941)
+++ /trunk/pstamp/test/pstamp_req_create	(revision 24942)
@@ -26,6 +26,6 @@
 
 pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
-pod2usage( -msg => "Required options: --input --output",
-           -exitval => 3) unless defined $input and defined $output;
+pod2usage( -msg => "Required options: --input --output | --req_name",
+           -exitval => 3) unless defined $input and (defined $output or defined $req_name);
 
 # The header kewords
@@ -95,5 +95,11 @@
 if ($req_name) {
     $header->[0]->{value} = $req_name;
-}
+} else {
+    $req_name = $header->[0]->{value};
+}
+
+die "no request name defined" unless defined $req_name;
+
+$output = $req_name . ".fits" if !$output;
 
 my $status = make_fits_table($output, EXTNAME, $numRows, \@colData, $columns, $header);
