Using Wait For File Logic
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
hi suresh....
your requirement could be achieved without a WFF but by using a shell script and an execute command activity.
Now call your script from execute command activity:
command:sh
parameter:unixscriptname
trigger: conditional trigger(return value=0),to proceed furthur....
anyway double check the script before running it
regards,
rajarp
your requirement could be achieved without a WFF but by using a shell script and an execute command activity.
Code: Select all
wait_time=<period u need to wait for that ready file>
time=0
while [ $time != $wait_time ]
do
if [ -f /readyfilelocation/Ready_*.csv ]
then
flag=0
echo "ready file found"
echo $flag
exit 0
break
else
time=$(($time+1))
fi
done
command:sh
parameter:unixscriptname
trigger: conditional trigger(return value=0),to proceed furthur....
anyway double check the script before running it
regards,
rajarp
-
- Premium Member
- Posts: 81
- Joined: Mon Nov 21, 2005 4:17 am
- Location: Sydney, Australia
- Contact:
Using Wait For File Logic
Hi Raja and Ray
Thanks very much for your answers.
I'll try and implement the logic.
Thanks very much for your answers.
I'll try and implement the logic.
SURESH NARASIMHA
Re: Using Wait For File Logic
Suresh,suresh.narasimha wrote:Hi Raja and Ray
Thanks very much for your answers.
I'll try and implement the logic.
I'd add a sleep command at the
"else
time=$(($time+1))
fi
"
and increment time by the sleep size, otherwise this is going to spin your processor out of control.
Andrew
Think outside the Datastage you work in.
There is no True Way, but there are true ways.
Think outside the Datastage you work in.
There is no True Way, but there are true ways.