Index: trunk/pstamp/scripts/pstamp_job_run.pl
===================================================================
--- trunk/pstamp/scripts/pstamp_job_run.pl	(revision 35901)
+++ trunk/pstamp/scripts/pstamp_job_run.pl	(revision 35902)
@@ -155,8 +155,12 @@
     if ($stage eq 'chip' or $stage eq 'warp') {
         my $cam_id = $params->{cam_id};
+        if (!$cam_id) {
+            carp "no cam_id found in job params\n";
+            exit $PS_EXIT_PROG_ERROR;
+        }
         ($calib_fd, $calibfile) = tempfile ("$outdir/calib.XXXX", UNLINK => !$save_temps);
         close $calib_fd;
 
-        my $command = "$psgetcalibinfo --cam_id $cam_id --output $calibfile";
+        my $command = "$psgetcalibinfo --cam_id $cam_id --output $calibfile --dbname $params->{imagedb}";
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
             run(command => $command, verbose => $verbose);
@@ -184,6 +188,6 @@
     $command .= " -stage $stage";
     $command .= " -forheader $calibfile" if $calibfile;
-    $command .= " -dbname $dbname" if $dbname;
-    $command .= " -dbserver $dbserver" if $dbserver;
+#    $command .= " -dbname $dbname" if $dbname;
+#    $command .= " -dbserver $dbserver" if $dbserver;
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $command, verbose => $verbose);
