@echo off
if exist f01 goto err1
if exist f25 goto err2
%dvdir%\object\oh166s.exe
copy %dvdir%\data\oh166 f25
call makef05
call existf05
if exist F05exist.txt goto fexist
goto err3
:fexist
del F05exist.txt
goto scatrun
:scatrun
call dvscat s
if exist converge.bat goto del1
goto cont1
:del1
del converge.bat
goto cont1
:cont1
if exist convd.txt goto del2
goto cont2
:del2
del convd.txt
goto cont2
:cont2
if exist notconv.txt goto del3
goto cont3
:del3
del notconv.txt
goto cont3
:cont3
call cnvchk200
call converge.bat
if exist convd.txt goto cont4
if exist notconv.txt goto cont4
del converge.bat
goto scatrun
:cont4
del converge.bat
call contrdall s
dir/w *.sca
call netc s
call bndodr s
call popanls s
rename F08P F08P_S
call popanl s
call atlist >atlist.out
call bllist >bllist.out
call prests
call wavnum s <%dvdir%\data\zero
call makel04 <%dvdir%\data\three
call lvlshm s
call hlgap
call hlgaps
type i08
type f08e
if exist notconv.txt goto notconv
del convd.txt
goto end
:notconv
echo;
echo ***********************************************************
echo *** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ***
echo ***********************************************************
echo ***   SCAT (Spin version) has not been converged yet.   ***
echo ***********************************************************
echo *** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ***
echo ***********************************************************
del notconv.txt
goto end
:err1
echo ***ERROR*** f01 already exist
goto end
:err2
echo ***ERROR*** f25 already exist
goto end
:err3
echo ***ERROR*** F05 not exist
goto end
:end
