(!*******************************************************
   Mosel Example Problems 
   ======================

   file runbatch2.mos
   ``````````````````
   Running several instances of a model from another
   Mosel model.
       
   (c) 2008 Fair Isaac Corporation
       author: S. Heipcke, May 2006
*******************************************************!)

model "Run model batch2"
 uses "mmjobs"

 parameters
  FILENAME = "batch2"
 end-parameters

 declarations
  modBatch: Model
 end-declarations
                                   ! Compile the model file
 if compile(FILENAME+".mos")<>0 then exit(1); end-if
 load(modBatch, FILENAME+".bim")   ! Load the bim file

 forall(i in 0..2) do                 ! Start model execution
  run(modBatch, "INFILE=batchdata" + i + ".dat, OUTFILE=batchdata" + 
                (i+1) + ".dat, LIM=" + (100+i*10))
  wait                             ! Wait for model termination
  dropnextevent                    ! Ignore termination event message
 end-do

end-model 
