Hey there,
I have this issue: I have to use the contents of a file generated by the function:
#!/usr/bin/ksh
date '+%m %d %Y' |
{
read MONTH DAY YEAR
CEROD=0
DAY=`expr "$DAY" - 10`
case "$DAY" in
0)
MONTH=`expr "$MONTH" - 1`
CEROD=
CEROM=0
case "$MONTH" in
0)
MONTH=12
YEAR=`expr "$YEAR" - 1`
;;
esac
DAY=`cal $MONTH $YEAR | grep . | fmt -1 | tail -1`
esac
case "$DAY" in
-1)
MONTH=`expr "$MONTH" - 1`
CEROD=
CEROM=0
case $MONTH in
1|3|5|7|8|10|12)
DAY=30;;
2)
DAY=27;;
4|6|9|11)
DAY=29;;
esac
esac
.
.
.
.
case "$DAY" in
-6)
MONTH=`expr "$MONTH" - 1`
CEROD=
CEROM=0
case $MONTH in
1|3|5|7|8|10|12)
DAY=25;;
2)
DAY=22;;
4|6|9|11)
DAY=24;;
esac
esac
echo "$YEAR$CEROM$MONTH$CEROD$DAY" > fecha1.txt
}
And use it as a parameter of the name of a file Iīm transfering with this shell script :
/dconnect/cdunix/ndm/bin/cdpmgr -i /dconnect/cdunix/ndm/cfg/AFOIXE.UNIX/initparm
.cfg
set -v
NDMAPICFG=/dconnect/cdunix/ndm/cfg/cliapi/ndmapi.cfg
FECHA=`date +%Y%m%d`
export NDMAPICFG FECHA
/dconnect/cdunix/ndm/bin/ndmcli -x << EOJ
submit env_1104_1 process snode=INSCONS.UNIX startt=(`date +%D`,06:10 am)
step1 copy from (file=/dconnect/envios/
20050808_AF_560_000.1104)
ckpt = 200k
compress = extended
to (file=/export/home/rec/CONTA/RECEPCION/$A_AF_560_000.1104
disp=rpl)
pend;
.
.
.
.
.
submit env_1104_5 process snode=INSCONS.UNIX startt=(`date +%D`,06:18 am)
step1
copy from (file=/dconnect/envios/20050814_AF_560_000.1104)
ckpt = 200k
compress = extended
to (file=/export/home/rec/CONTA/RECEPCION/
20050814_AF_560_000.1104
disp=rpl)
pend;
EOJ
So long I havenīt figured out how to, so anyone could please help?
Thanks a lot!