# ebmdemo script
if [ -z "$EBMHOME" ]
then
  . batchenv
fi
if [ ! -f $PACK/etc/EBM.ACT ]
then
  echo Batch Node must be active
  exit 1
fi
echo Starting Test .... 
ebmsys -c subsys1 1>/dev/null 2>&1
ebmsys -s subsys1 1>/dev/null 2>&1
jobn1=`subjob JOB1 -W$EBMHOME/samples/ebmdemo -v -j`
echo Submitting Job JOB1, number $jobn1 .... 
insjob $jobn1 -w
jobn2=`subjob JOB2 -W$EBMHOME/samples/ebmdemo -v -j`
echo Submitting Job JOB2, number $jobn2 .... 
jobn3=`subjob JOB3 -W$EBMHOME/samples/ebmdemo -v -j`
echo Submitting Job JOB3, number $jobn3 .... 
insjbl $jobn2 $jobn3 -w
jobn4=`subjob JOB4 -W$EBMHOME/samples/ebmdemo -v -j`
echo Submitting Job JOB4, number $jobn4 .... 
insjob $jobn4 -w
ebmsys -d subsys1 1>/dev/null 2>&1
echo Test terminated
