rem --------------- STAGE 1
rem prepares RunGTAP application

del *.bak
del *.log
del *.flg

..\altpar.exe -cmf altpar.cmf >nul
if errorlevel 1 goto error
gtpvew.exe -cmf gtpvew.cmf >nul
if errorlevel 1 goto error
samview -cmf samview.cmf >nul
if errorlevel 1 goto error
shocks.exe -sti shocks.sti >shock.log
if errorlevel 1 goto error

rem BATCH JOB SUCCESSFUL
echo off
goto endbat

:error1
echo off
echo ###### ERROR: BATCH JOB FAILED #####
echo Issue is with creating database.  
echo Check log file; most recent is listed last
dir/od *.log
dir/od *.log >err.flg
goto endbat

:error
echo off
echo ###### ERROR: BATCH JOB FAILED #####
echo Check log file; most recent is listed last
dir/od *.log
dir/od *.log >err.flg
rem echo Please press CTRL-C to terminate batch job
rem pause

:endbat
