Index: trunk/ippTasks/diskbalance.pro
===================================================================
--- trunk/ippTasks/diskbalance.pro	(revision 29409)
+++ trunk/ippTasks/diskbalance.pro	(revision 29426)
@@ -13,4 +13,5 @@
 
 book init balancePending
+book init balanceControl
 
 macro balance.reset
@@ -64,4 +65,15 @@
     host $1
   end
+end
+
+macro set.balance.numbers
+  if ($0 != 3)
+    echo "USAGE: set.balance.numbers (N_sources) (M_destinations)"
+    break
+  end
+
+  book newpage balanceControl control
+  book setword balanceControl control nSources $1
+  book setword balanceControl control mDestinations $2
 end
 
@@ -95,5 +107,8 @@
     end
 
-    command neb-admin --host $NEB_HOST --db $NEB_DB --user $NEB_USER --pass $NEB_PASS --pendingbalance --limit 2000 --so_id_start $BALANCE_SO_ID_START --so_id_range $BALANCE_SO_ID_RANGE
+    book getword balanceControl control nSources -var BALANCE_N
+    book getword balanceControl control mDestinations -var BALANCE_M
+
+    command neb-admin --host $NEB_HOST --db $NEB_DB --user $NEB_USER --pass $NEB_PASS --pendingbalance --limit 500 --so_id_start $BALANCE_SO_ID_START --so_id_range $BALANCE_SO_ID_RANGE  --balancesources $BALANCE_N --balancedestination $BALANCE_M
 
   end
@@ -171,6 +186,6 @@
 
     book getword balancePending $pageName key              -var KEY
-    book getword balancePending $pageName source_host      -var SOURCE
-    book getword balancePending $pageName destination_host -var DESTINATION
+    book getword balancePending $pageName source_name      -var SOURCE
+    book getword balancePending $pageName destination_name -var DESTINATION
     
     # Fix this with multihost restriction when possible.
