Hi,
I have one job that runs daily and creates daily files. At the end I compare the today's file with previous day's file. And if today's file size is greater or equal to previous day's file, then it is ok, else I need to through error.
I have following piece of code:
typeset -i SIZE_CURRDATE
typeset -i SIZE_PREVDATE
DAY=`echo $RUN_DATE | cut -c 5-6`
if [ $DAY -ne "01" ] ; then
SIZE_CURRDATE=`m_ls -l mfile:file_name | awk '{ print $5 }' | sed 's/,//g'`
SIZE_PREVDATE=`m_ls -l mfile:file_name | awk '{ print $5 }' | sed 's/,//g'`
echo "PREV_DATE : " $PREV_DATE
echo "SIZE_CURRDATE : " $SIZE_CURRDATE
echo "SIZE_PREVDATE : " $SIZE_PREVDATE
if [ $SIZE_CURRDATE -le $SIZE_PREVDATE ] ; then
echo "ERROR : The output file is of zero length."
exit -1
else
echo "OK"
fi
fi
This runs fine in AIX UNIX. But it is giving arithmatic overflow error in MVS USS system when file size is more or equal to 10 digits.
Could you please help me to solve this?