(!******************************************************* Mosel Example Problems ====================== file runsubevnt.mos ``````````````````` Running a model from another Mosel model, getting the submodel termination status. (c) 2008 Fair Isaac Corporation author: S. Heipcke, May 2006 *******************************************************!) model "Run model testsub" uses "mmjobs" declarations modSub: Model ev: Event end-declarations ! Compile the model file if compile("testsub.mos")<>0 then exit(1); end-if load(modSub, "testsub.bim") ! Load the bim file run(modSub) ! Start model execution wait(1) ! Wait 1 second for an event if isqueueempty then ! No event has been sent: model still runs stop(modSub) ! Stop the model wait ! Wait for model termination end-if ev:=getnextevent ! An event is available: model finished writeln("Event class: ", getclass(ev)) writeln("Event value: ", getvalue(ev)) writeln("Exit code : ", getexitcode(modSub)) end-model