Index: trunk/MagicSoft/Mars/datacenter/scripts/sourcefile
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/sourcefile	(revision 9456)
+++ trunk/MagicSoft/Mars/datacenter/scripts/sourcefile	(revision 9489)
@@ -38,9 +38,11 @@
 fi
 
-source `dirname $0`/setup 
-
-mars=`dirname $0 | sed -e 's/\/datacenter\/scripts//'`
-macrospath=$mars/datacenter/macros
-scriptspath=$mars/datacenter/scripts
+if [ "$AUTOMATIONSETUP" = "" ]
+then 
+   echo "Please set the environment variable \$AUTOMATIONSETUP."
+   exit
+fi
+
+source `dirname $0`/setup.$AUTOMATIONSETUP
 
 datetime=`date +%F-%H-%M-%S`
@@ -157,5 +159,6 @@
 jmerrorlog=$runlogpath/jobmanager-error`date +%F`.log
 jmscriptlog=$runlogpath/jobmanager`date +%F`.log
-steps=$mars/resources/steps.rc
+
+# check if rc-files are available
 if ! ls $steps >/dev/null
 then
@@ -163,5 +166,4 @@
    finish
 fi
-sqlrc=$mars/sql.rc
 if ! ls $sqlrc >/dev/null
 then
@@ -169,4 +171,5 @@
    finish
 fi
+
 # resetting values
 pno=0
@@ -186,12 +189,4 @@
 # in the following the functions, which are needed by several scripts, are 
 # defined
-
-# function to do continue in a loop and produce according logging
-function cont()
-{
-   date
-   echo ""
-   continue
-}
 
 # function to check if a process is already locked
@@ -368,5 +363,6 @@
    then
       printprocesslog "ERROR could not query number of processes from db (program: $program, function getstatus)"
-      cont
+      echo `date +%F\ %T`" ERROR could not query number of processes from db (program: $program, function getstatus)"
+      continue
    fi
 }
