Index: /trunk/DataCheck/Sourcefile.sh
===================================================================
--- /trunk/DataCheck/Sourcefile.sh	(revision 19208)
+++ /trunk/DataCheck/Sourcefile.sh	(revision 19209)
@@ -340,5 +340,5 @@
    if [ "$sort" = "" ]
    then 
-      query=$query" DESC "
+      query=$query" ASC "
    else
       query=$query" "$sort
@@ -385,5 +385,6 @@
    #numproc=`sendquery `#cannot be done with sendquery, because of row counting
    printprocesslog "DEBUG send query "$query
-   if ! numproc=`mysql --default-file=$sqlrc -s -e " $query " | wc -l`
+   printprocesslog "BLA "`which mysql`
+   if ! numproc=`mysql --defaults-file=$sqlrc -s -e " $query " | wc -l`
    then
       printprocesslog "ERROR could not query number of processes from db (program: $program, function getstatus, mysqlsetup $sqlrc)"
@@ -475,6 +476,6 @@
    for otherstep in $othersteps
    do
-      query=$query", "$otherstep"Status.fStartTime=NULL "
-      query=$query", "$otherstep"Status.fStopTime=NULL "
+      query=$query", "$otherstep"Status.fStartTime=IF("$otherstep"Status.fStartTime='1970-01-01 00:00:00', '1970-01-01 00:00:00', NULL) "
+      query=$query", "$otherstep"Status.fStopTime=IF("$otherstep"Status.fStartTime='1970-01-01 00:00:00', '1970-01-01 00:00:00', NULL) "
       query=$query", "$otherstep"Status.fAvailable=NULL "
       query=$query", "$otherstep"Status.fReturnCode=NULL "
