Index: trunk/MagicSoft/Mars/datacenter/scripts/doexclusions
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/doexclusions	(revision 7938)
+++ trunk/MagicSoft/Mars/datacenter/scripts/doexclusions	(revision 7944)
@@ -35,20 +35,16 @@
 #
 
+source `dirname $0`/sourcefile
+printprocesslog "INFO starting $0"
 program=doexclusions
-source `dirname $0`/sourcefile
+column=fExclusionsDone
 
 set -C
 
-column=fExclusionsDone
-
-lockfile=$lockpath/lock-$program.txt
-
-scriptlogpath=$runlogpath/$program
-makedir $scriptlogpath
-scriptlog=$scriptlogpath/$program-$datetime.log
-
+scriptlog=$runlogpath/$program-$datetime.log
 date >> $scriptlog 2>&1
 
 # check if the script is already running
+lockfile=$lockpath/lock-$program.txt
 checklock  >> $scriptlog 2>&1
 
@@ -71,4 +67,5 @@
 do 
    echo "do exclusions for date "$date >> $scriptlog 2>&1
+   printprocesslog "INFO do exclusions for $date"
    year2=`echo $date | cut -c 1-4`
    var1=$year2
@@ -83,6 +80,13 @@
 
    case $check1 in
-      1)   echo " check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1 ;;
+      1)   echo " check1=$check1 -> everything ok -> setting status..." >> $scriptlog 2>&1 
+           printprocesslog "INFO exclusions successfully done for $date"
+           ;;
+      0)   echo " check1=$check1 -> no connection to db -> continue..." >> $scriptlog 2>&1 
+           printprocesslog "WARN connection to DB failed"
+           check="no"
+           ;;
       *)   echo " check1=$check1 -> ERROR -> step has to be repeated" >> $scriptlog 2>&1 
+           printprocesslog "ERROR $program.C failed"
            com=$Fdoexcl
            check=$check1
