Index: trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries	(revision 9046)
+++ trunk/MagicSoft/Mars/datacenter/scripts/buildsequenceentries	(revision 9047)
@@ -76,5 +76,5 @@
    setstatus "start" >> $scriptlog 2>&1
 
-   check1=`root -q -b $macrospath/buildsequenceentries.C+\("\"$date\""\,"\"$datapath\""\,"\"$sequpath\""\,kFALSE\) | tee $buildsequentrieslog | intgrep`
+   check1=`root -q -b $macrospath/buildsequenceentries.C+\("\"$date\""\,"\"$datapath\""\,"\"$sequpath\""\,1\,kFALSE\) | tee $buildsequentrieslog | intgrep`
 
    case $check1 in
Index: trunk/MagicSoft/Mars/datacenter/scripts/dbchk
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/dbchk	(revision 9046)
+++ trunk/MagicSoft/Mars/datacenter/scripts/dbchk	(revision 9047)
@@ -92,4 +92,5 @@
    then
       echo "No sequence file: $file" >> $scriptlog 2>&1
+      printprocesslog "ERROR No sequence file: $file" 
       continue
    fi
@@ -99,4 +100,5 @@
    then
       echo "Sequence-File $sequence exist but it is not in Sequences." >> $scriptlog 2>&1
+      printprocesslog "ERROR Sequence-File $sequence exists, but it is not in Sequences (DB)." 
       continue
    fi
@@ -112,4 +114,5 @@
    then
       echo "Invalid directory: $dir" >> $scriptlog 2>&1
+      printprocesslog "ERROR Invalid directory: $dir" 
       continue
    fi
@@ -119,4 +122,5 @@
    then
       echo "$dir exists but no corresponding sequence in Sequences." >> $scriptlog 2>&1
+      printprocesslog "ERROR $dir exists, but no corresponding sequence in Sequences (DB)." 
       continue
    fi
@@ -132,4 +136,5 @@
    then
       echo "Invalid directory: $dir" >> $scriptlog 2>&1
+      printprocesslog "ERROR Invalid directory: $dir" 
       continue
    fi
@@ -139,4 +144,5 @@
    then
       echo "$dir exists but no corresponding sequence in Sequences." >> $scriptlog 2>&1
+      printprocesslog "ERROR $dir exists, but no corresponding sequence in Sequences (DB)." 
       continue
    fi
@@ -152,4 +158,5 @@
    then
       echo "Sequence-File for $sequence not found but in db." >> $scriptlog 2>&1
+      printprocesslog "ERROR Sequence-File for $sequence not found but in DB." 
    fi
 done
@@ -164,4 +171,5 @@
    then
       echo "Sequence $sequence exists in Sequences but not in RunData." >> $scriptlog 2>&1
+      printprocesslog "Sequence $sequence exists in Sequences but not in RunData (DB)."
       continue
    fi
@@ -177,4 +185,5 @@
    then
       echo "Sequence $sequence exists in RunData but not in Sequences." >> $scriptlog 2>&1
+      printprocesslog "Sequence $sequence exists in RunData but not in Sequences (DB)." 
       continue
    fi
Index: trunk/MagicSoft/Mars/datacenter/scripts/doexclusions
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/doexclusions	(revision 9046)
+++ trunk/MagicSoft/Mars/datacenter/scripts/doexclusions	(revision 9047)
@@ -76,5 +76,5 @@
    setstatus "start" >> $scriptlog 2>&1
 
-   check1=`root -q -b $macrospath/doexclusions.C+\("\"$date\""\) | tee $doexclusionslog | intgrep`
+   check1=`root -q -b $macrospath/doexclusions.C+\("\"$date\""\,1\,kFALSE\) | tee $doexclusionslog | intgrep`
 
    case $check1 in
Index: trunk/MagicSoft/Mars/datacenter/scripts/sourcefile
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/sourcefile	(revision 9046)
+++ trunk/MagicSoft/Mars/datacenter/scripts/sourcefile	(revision 9047)
@@ -283,5 +283,5 @@
    query=$query" isnull($column) "
    query=$query" and isnull(fStartTime) and isnull(fFailedTime) and isnull(fFailedCode) and isnull(fFailedCodeAdd) and isnull(fReturnCode) "
-   query=$query" order by $primary desc "
+   query=$query" order by fPriority desc "
 #   echo " QUERY: "$query
    if ! process=`mysql -s -u $us --password=$pw --host=vela $db -e " $query "`
@@ -328,5 +328,5 @@
    query=$query" isnull($column) "
    query=$query" and isnull(fStartTime) and isnull(fFailedTime) and isnull(fFailedCode) and isnull(fFailedCodeAdd) and isnull(fReturnCode) "
-   query=$query" order by $primary desc "
+   query=$query" order by fPriority desc "
    query=$query" limit 0, 1 "
 #   echo " QUERY: "$query
Index: trunk/MagicSoft/Mars/datacenter/scripts/writesequencefiles
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/writesequencefiles	(revision 9046)
+++ trunk/MagicSoft/Mars/datacenter/scripts/writesequencefiles	(revision 9047)
@@ -81,5 +81,5 @@
    setstatus "start" >> $scriptlog 2>&1
 
-   check2=`root -q -b $macrospath/writesequencefile.C+\($sequence\,"\"$sequpath\""\) | tee $writesequencefilelog | intgrep`
+   check2=`root -q -b $macrospath/writesequencefile.C\($sequence\,1\,"\"$sequpath\""\) | tee $writesequencefilelog | intgrep`
    case $check2 in
       1)   echo " check2=$check2 -> everything ok " >> $scriptlog 2>&1 
