System.out.println("Start batch:");
System.out.println(debug);
for(int i=1;i<=nRun;i++){
status=win32Mp300ComDll.MPS_ExecuteBatch(batchId, BATCH_EXECUTE_STOP_ON_ERROR, pdwFaultyLine);
if (RET_OK != status) {
throw new MP300Exception("Batch iteration "+i+": MPS_ExecuteBatch returned " + status + "\n" +
"pdwFaultyLine="+pdwFaultyLine.getValue(), status);
}
if(0==(i%25))
System.out.print(".");
if(0==(i%1000))
System.out.println(i+" iterations done");
}
status=win32Mp300ComDll.MPS_CloseBatch(batchId);
if (RET_OK != status) {
throw new MP300Exception("MPS_CloseBatch returned " + status, status);
}
if(0!=(nRun%10))
System.out.println(nRun+" iterations done");
System.out.println("Batch terminated succesfully");
}