Index: trunk/MagicSoft/Mars/datacenter/scripts/doexclusions
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/doexclusions	(revision 7465)
+++ trunk/MagicSoft/Mars/datacenter/scripts/doexclusions	(revision 7471)
@@ -103,21 +103,23 @@
    echo "do exclusions for date "$date >> $scriptlog 2>&1
    year2=`echo $date | cut -c 1-4`
+   var1=$year2
+   var2=$date
    doexclusionspath=$logpath/$program/$year2
    makedir $doexclusionspath >> $scriptlog 2>&1
+
+   echo "run $program..." >> $scriptlog 2>&1
+   setstatus "start" >> $scriptlog 2>&1
 
    check1=`root -q -b $macrospath/doexclusions.C+\("\"$date\""\) | tee $doexclusionspath/doexclusions-$date.log | grep int | sed -e 's/(int)//'`
 
    case $check1 in
-      1)   echo "check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1
-           statustime="Now()"
-           failed="NULL"
-           starttime="NULL"
-           failedtime="NULL"
-           var1=$year2
-           var2=$date
-           setstatus
-   	;;
+      1)   echo "check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1 ;;
       *)   echo "check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 ;;
+           com="doing exclusions for date $date failed"
+           check=$check1
+           ;;
    esac
+   echo "inserting the status for $program for date $date into the db" >> $scriptlog 2>&1
+   setstatus "stop" >> $scriptlog 2>&1
 done
 
