Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 7960)
+++ trunk/MagicSoft/Mars/Changelog	(revision 7961)
@@ -31,4 +31,14 @@
      - removed nail 
      - improved logging
+
+   * datacenter/macros/filldotrun.C:
+     - enhanced return-values 
+
+   * datacenter/macros/insertdataset.C:
+     - fixed return-values in case of error
+
+   * datacenter/macros/insertdataset.C, 
+     datacenter/scripts/insertdatasets:
+     - implemented return value for 'exists already in db'
 
 
Index: trunk/MagicSoft/Mars/datacenter/macros/filldotrun.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/filldotrun.C	(revision 7960)
+++ trunk/MagicSoft/Mars/datacenter/macros/filldotrun.C	(revision 7961)
@@ -654,5 +654,5 @@
         cout << " <" << n << "> " << (dummy?"DUMMY":"") << endl;
 
-        return n<0 ? 0 : 1;
+        return n<0 ? 2 : 1;
     }
 
@@ -669,5 +669,5 @@
 
         if (n<0)
-            return 0;
+            return 2;
     }
 
Index: trunk/MagicSoft/Mars/datacenter/macros/insertdataset.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/insertdataset.C	(revision 7960)
+++ trunk/MagicSoft/Mars/datacenter/macros/insertdataset.C	(revision 7961)
@@ -150,5 +150,5 @@
         cout << "Error - could not get sourcename from DB -> " << flush;
         cout << "maybe you have the wrong sourcename in your datasetfile" << endl;
-        return 0;
+        return 2;
     }
 
@@ -172,5 +172,5 @@
         {
             cout << "Error - could not insert dataset" << endl;
-            return 0;
+            return 2;
         }
         delete res;
@@ -185,5 +185,5 @@
         {
             cout << "Error - could not insert dataset" << endl;
-            return 0;
+            return 2;
         }
         delete res;
@@ -192,5 +192,5 @@
     {
         cout << number << " already exists... " << endl;
-        return 0;
+        return 3;
     }
 
Index: trunk/MagicSoft/Mars/datacenter/scripts/insertdatasets
===================================================================
--- trunk/MagicSoft/Mars/datacenter/scripts/insertdatasets	(revision 7960)
+++ trunk/MagicSoft/Mars/datacenter/scripts/insertdatasets	(revision 7961)
@@ -102,4 +102,7 @@
            printprocesslog "INFO dataset $no2 successfully inserted"
            ;;
+      3)   echo " check0=$check0 -> everything ok " >> $scriptlog 2>&1 
+           printprocesslog "INFO dataset $no2 exists already"
+           ;;
       0)   echo " check1=$check1 -> no connection to db -> continue..." >> $scriptlog 2>&1 
            printprocesslog "WARN connection to DB failed"
