Index: trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/runcallisto	(revision 7465)
+++ trunk/MagicSoft/Mars/datacenter/scripts/runcallisto	(revision 7467)
@@ -170,5 +170,7 @@
   fi
 
-  echo "run callisto..." >> $scriptlog 2>&1
+  echo "run $program..." >> $scriptlog 2>&1
+  setstatus "start"
+
   ./callisto -b -q -v4 -f -raw --log=$outpath/$program$no2.log --html=$outpath/$program$no2.html --out=$outpath --config=$callistorcseq $sequfile  2>> $scriptlog > /dev/null
   check1=$?
@@ -206,5 +208,7 @@
              then
                 echo "no ccfile found for run "$runno >> $scriptlog 2>&1
-                break 2
+                com="no ccfile for run $runno"
+                check=0
+                break
              fi
              echo "cacofile: "$cacofile >> $scriptlog 2>&1
@@ -229,4 +233,8 @@
                    fi
                 done
+                echo "no cacofile found" >> $scriptlog 2>&1
+                com="no cacofile for run $runno"
+                check=0
+                break
              fi
              ./merpp -u --log=$merpplogpath/merppccupdate$runno.log --html=$merpplogpath/merppccupdate$runno.html --auto-time-stop --runfile=$runno $ccfile $calfile 2>> $scriptlog> /dev/null
@@ -235,5 +243,7 @@
                      0)   echo "check2=$check2 -> everything ok, merppccupdate worked -> continue" >> $scriptlog 2>&1;;
          	     *)   echo "check2=$check2 -> ERROR -> merppccupdate failed" >> $scriptlog 2>&1
-                          continue 2 ;;
+                          com="merppccupdate failed for run $runno"
+                          check=$check2
+                          break ;;
              esac
              ./merpp -u --log=$merpplogpath/merppcacoupdate$runno.log --html=$merpplogpath/merppcacoupdate$runno.html --auto-time $cacofile $calfile 2>> $scriptlog> /dev/null
@@ -242,20 +252,18 @@
                      0)   echo "check3=$check3 -> everything ok, merppcacoupdate worked -> continue" >> $scriptlog 2>&1;;
          	     *)   echo "check3=$check3 -> ERROR -> merppcacoupdate failed" >> $scriptlog 2>&1
-                          continue 2 ;;
+                          com="merppcacoupdate failed for run $runno"
+                          check=$check3
+                          break ;;
              esac
           done
-          
-          # set status for calibration if merpp updates are also done
-          echo "inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1
-          statustime="Now()"
-          failed="NULL"
-          starttime="NULL"
-          failedtime="NULL"
-          var1=$no
-          var2=$no2
-          setstatus
   	  ;;
-     *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1;;
+     *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1
+          com="calibration failed"
+          check=$check1
+          ;;
   esac
+  # set status 
+  echo "inserting the status for $program for sequence $sequence into the db" >> $scriptlog 2>&1
+  setstatus "stop"
 done
 
