hi,
I have a big file that contains datas since 4 years ago.
I need re-create this file but just lines that are 13 months ago from today.
see what I have: ( I have a file.ksh that calls this file.scl ok !!)
======== file.scl ================
/STATISTICS=stderr
/STABLE
/NODUPLICATES
/EXECUTE " today=`date +%Y%m%d` "
/EXECUTE " 13m_ago=`expr ${today} - 10000` "
/INFILE=$PAR_SCL1
/FIELD=(CONTA_CORRENTE, POSITION=1, SIZE=13)
/FIELD=(DATA_VENCIMENTO, POSITION=50, SIZE=10)
/CONDITION=(cond1, TEST=(DATA_VENCIMENTO > ($13m_ago) )
/INCLUDE=(CONDITION=cond1)
/KEY=(NUMERO_FATURA, ASCENDING)
/OUTFILE=$PAR_SCL2
/FIELD=(CONTA_CORRENTE, POSITION=1, SIZE=13)
/FIELD=(DATA_VENCIMENTO, POSITION=50, SIZE=10)
============================================
"DATA_VENCIMENTO" is the date that have to be in the maximum equal 13 months ago.
the layout of DATA_VENCIMENTO is 20071115 , for exemple.
I've already see the topic (
https://www.unix.com/answers-frequent...rithmetic.html) but it didn't help me ...
My Unix is Solaris.
does somebody can help ?
thanks , Andrea.