#!/bin/sh

LOG="/rev31/nat/log"

ECON="0000"		
SOTOWAKU_JURAI="0000"	
SOTOWAKU_OP="0000"	
VER="1_3_0_0"		
KAKUDAI="0"		
KOKUNEN="0000"		
OPTION="0"		
KAKO="0"		
TINSURA="1"             
BIRTH="0"		
DEATH="M"		
OP_START="2026"		


if [ ${OPTION} = "1" ]
then
	SOTOWAKU=${SOTOWAKU_OP}
else
	SOTOWAKU=${SOTOWAKU_JURAI}
fi

IO_DIR="/rev31/nat/io_file/1_3_0_0"
INFILE="/infile.csv"
OUTFILE="/outfile.csv"

JIKKO_DIR="/rev31/nat/jikko"

echo "プログラム（Version:${VER} , 試算番号:${KOKUNEN}-${ECON}-${SOTOWAKU} , Part=${KAKUDAI} , Option=${OPTION}）を実行しますか？（y/n）"

read ans

if [ "$ans" = "y" ]
then

echo "プログラム実行開始（Version:${VER} , 試算番号：${KOKUNEN}-${ECON}-${SOTOWAKU} , Part=${KAKUDAI} , Option=${OPTION} ） : ${USER}" >> ${LOG}
date >> ${LOG}
echo "">> ${LOG}

echo "*****プログラム実行*****"
${JIKKO_DIR}/ver${VER}.out "${IO_DIR}${INFILE}" "${IO_DIR}${OUTFILE}" ${KOKUNEN} ${ECON} ${SOTOWAKU} ${KAKUDAI} ${KAKO} ${OPTION} ${SOTOWAKU_JURAI} ${TINSURA} ${BIRTH} ${DEATH} ${OP_START}

echo "実行終了" >> ${LOG}
date >> ${LOG}
echo "">> ${LOG}

fi


