The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 11-16-2007
andrea_mussap andrea_mussap is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 4
re.: calculate 13 months ago

Perderabo, thanks but your example didnīt works for me.

but I found the solution:

in my main program I calculate 13 months ago

hoje=`date +%Y%m%d`
data_13m=`expr ${hoje} - 10200`

and then, I've send the variable data_13m to the file.scl

export PAR_SCL3=${data_13m}

in the file.scl I did:

.
.
/EXECUTE "$PAR_SCL3"
/INFILE=$PAR_SCL1
/FIELD=(CONTA_CORRENTE, POSITION=1, SIZE=13)
/FIELD=(DATA_VENCIMENTO, POSITION=50, SIZE=10)
/CONDITION=(cond1, TEST=(DATA_VENCIMENTO > $PAR_SCL3 ))

and it worked !
by.