Index: trunk/MagicSoft/Mars/datacenter/scripts/runcallisto
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/runcallisto	(revision 7473)
+++ trunk/MagicSoft/Mars/datacenter/scripts/runcallisto	(revision 7474)
@@ -217,5 +217,5 @@
              if [ "$cacofile" = "" ]
              then 
-                echo "no cacofile found for run "$runno >> $scriptlog 2>&1
+                echo "cacofile with no $runno not found" >> $scriptlog 2>&1
                 echo "finding cacofile..." >> $scriptlog 2>&1
                 for (( i = 0; i <= 10; i++ ))
@@ -229,4 +229,10 @@
                    if [ "$cacofile" = "" ]
                    then
+                      if [ $i -eq 9 ]
+                      then
+                         echo "no cacofile found" >> $scriptlog 2>&1
+                         com="no cacofile for run $runno"
+                         check=0
+                      fi   
                       continue
                    else
@@ -235,8 +241,4 @@
                    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
Index: trunk/MagicSoft/Mars/datacenter/scripts/sourcefile
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/sourcefile	(revision 7473)
+++ trunk/MagicSoft/Mars/datacenter/scripts/sourcefile	(revision 7474)
@@ -47,4 +47,6 @@
 datasetpath=/magic/datasets
 
+check="ok"
+
 
 function makedir()
@@ -92,5 +94,5 @@
        stop)   echo "stop"
                case $check in
-                  0)  echo " ok"
+                 ok)  echo " ok"
                       statustime="Now()"
                       ;;
@@ -107,5 +109,4 @@
                ;;
    esac
-   check=
 
 #   printstatusvalues
@@ -116,6 +117,6 @@
    checkstatus=`root -q -b $macrospath/setstatus.C+\("\"$sequence\""\,"\"$table\""\,"\"$column\""\,"\"$statustime\""\,"\"$failedcode\""\,"\"$failedcomment\""\,"\"$starttime\""\,"\"$failedtime\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'`
    case $checkstatus in
-      1)   echo "checkstatus=$checkstatus -> everything ok, status has been set"
-      *)   echo "checkstatus=$checkstatus -> ERROR -> step could not be set"
+      1)   echo "checkstatus=$checkstatus -> everything ok, status has been set";;
+      *)   echo "checkstatus=$checkstatus -> ERROR -> step could not be set";;
    esac
 }
