wait for a file
Moderators: chulett, rschirm, roy
wait for a file
hello
i want to wait for a source file for only 4hours.if i do not get how will i know and then how to send that message if we want to send that message that file not reached.
i want to wait for a source file for only 4hours.if i do not get how will i know and then how to send that message if we want to send that message that file not reached.
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Have you even tried to use the stage yet? It's pretty obvious how to set the time (ie, number of hours to wait) if you look at it.
Like any of the Sequencer stages, you use 'triggers' to control what happens next. An 'OK' trigger will fire when the file arrives, link that to the job that should process the file and also to a Notification Activity stage if you want people to know the file arrived.
Then, an 'Otherwise' (or Failed) trigger will fire when the' time to wait' expires due to non-arrival of the file. Use that to do whatever is appropriate then - send and email, abort the sequence, whatever.
Like any of the Sequencer stages, you use 'triggers' to control what happens next. An 'OK' trigger will fire when the file arrives, link that to the job that should process the file and also to a Notification Activity stage if you want people to know the file arrived.
Then, an 'Otherwise' (or Failed) trigger will fire when the' time to wait' expires due to non-arrival of the file. Use that to do whatever is appropriate then - send and email, abort the sequence, whatever.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Re: wait for a file
Why don't you write a shell script to get this done? Why unnecessarily have an additional DataStage layer.
Get a cronjob to run teh script every 4 hours. Move the files (based on any criteria that you might have) to another directory from where DS can fetch it. Move the rest of the files (if any) to another directory and have another process to work on them.
(Or may be I understood teh question wrong.)
- Sachin
Get a cronjob to run teh script every 4 hours. Move the files (based on any criteria that you might have) to another directory from where DS can fetch it. Move the rest of the files (if any) to another directory and have another process to work on them.
(Or may be I understood teh question wrong.)
- Sachin
paddu wrote:hello
i want to wait for a source file for only 4hours.if i do not get how will i know and then how to send that message if we want to send that message that file not reached.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Use a job sequence that has a Wait For File activity. That's where you set the timeout, and the file path.
Have two outputs from this activity, one that is taken if the file appears, the other if the file does not appear (control this on the Triggers tab).
Connect the second link to a Notification activity to send the email.
Connect the first link to a Job activity that runs that job that uses the file.
Easy.
Have two outputs from this activity, one that is taken if the file appears, the other if the file does not appear (control this on the Triggers tab).
Connect the second link to a Notification activity to send the email.
Connect the first link to a Job activity that runs that job that uses the file.
Easy.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Re: wait for a file
IMHO.
I prefer going outside the tool only when I must, otherwise why am I using it in the first place? why not leave it as it was before I got DS?!
I prefer going outside the tool only when I must, otherwise why am I using it in the first place? why not leave it as it was before I got DS?!
sachinkc wrote:Why don't you write a shell script to get this done? Why unnecessarily have an additional DataStage layer.
Get a cronjob to run teh script every 4 hours. Move the files (based on any criteria that you might have) to another directory from where DS can fetch it. Move the rest of the files (if any) to another directory and have another process to work on them.
(Or may be I understood teh question wrong.)
- Sachin
paddu wrote:hello
i want to wait for a source file for only 4hours.if i do not get how will i know and then how to send that message if we want to send that message that file not reached.
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Re: wait for a file
Roy,
The problem is reliability, and the production support. Not all production support guys will know DataStage, but many will feel comfortable with the OS commands.
Ofcourse, the DataStage consultant is expected to go in and out of DataStage judiciously while creating ETL.
I'm talking about the rates (DS and third party consultants) when I write below. Its better to make DS work for the company where it's installed, rather than the company work for DS, although, I wouldn't mind it a bit being a DS consultant myself.
Sachin
The problem is reliability, and the production support. Not all production support guys will know DataStage, but many will feel comfortable with the OS commands.
Ofcourse, the DataStage consultant is expected to go in and out of DataStage judiciously while creating ETL.
I'm talking about the rates (DS and third party consultants) when I write below. Its better to make DS work for the company where it's installed, rather than the company work for DS, although, I wouldn't mind it a bit being a DS consultant myself.
Sachin
roy wrote:IMHO.
I prefer going outside the tool only when I must, otherwise why am I using it in the first place? why not leave it as it was before I got DS?!
Re: wait for a file
the fact you have DS should encorage you to be an expert.sachinkc wrote:Roy,
The problem is reliability, and the production support. Not all production support guys will know DataStage, but many will feel comfortable with the OS commands.
Ofcourse, the DataStage consultant is expected to go in and out of DataStage judiciously while creating ETL.
I'm talking about the rates (DS and third party consultants) when I write below. Its better to make DS work for the company where it's installed, rather than the company work for DS, although, I wouldn't mind it a bit being a DS consultant myself.
Sachin
it might be, correction it is a golden oportunity advancing yourself beyond your current status at your current position and or open new opertunities as well as establishing your current position if your satisfied with things as they are.
most times it is worth while learning the "right" way of doing things rather then use the old and familiar just because it is easy and what you know.
life is a never ending learning expiriance (ok getting carried away )
being a DS consultant is just a mater of time/experiance and some personal investment/effort (plus a bit of personal ability as with all things).
though you'll find it a bit harder to compete with the expert being ex Ascential employees and such since you miss having the inside stuff.
then again I'm not self employed now a day and in some mannors it is holding me back a bit (objectively speaking).
p.s: this is one of those you stop and think press post or dump it to oblivian
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Re: wait for a file
peace
roy wrote:the fact you have DS should encorage you to be an expert.sachinkc wrote:Roy,
The problem is reliability, and the production support. Not all production support guys will know DataStage, but many will feel comfortable with the OS commands.
Ofcourse, the DataStage consultant is expected to go in and out of DataStage judiciously while creating ETL.
I'm talking about the rates (DS and third party consultants) when I write below. Its better to make DS work for the company where it's installed, rather than the company work for DS, although, I wouldn't mind it a bit being a DS consultant myself.
Sachin
it might be, correction it is a golden oportunity advancing yourself beyond your current status at your current position and or open new opertunities as well as establishing your current position if your satisfied with things as they are.
most times it is worth while learning the "right" way of doing things rather then use the old and familiar just because it is easy and what you know.
life is a never ending learning expiriance (ok getting carried away )
being a DS consultant is just a mater of time/experiance and some personal investment/effort (plus a bit of personal ability as with all things).
though you'll find it a bit harder to compete with the expert being ex Ascential employees and such since you miss having the inside stuff.
then again I'm not self employed now a day and in some mannors it is holding me back a bit (objectively speaking).
p.s: this is one of those you stop and think press post or dump it to oblivian