wait for a file

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
paddu
Premium Member
Premium Member
Posts: 232
Joined: Tue Feb 22, 2005 11:14 am
Location: California

wait for a file

Post by paddu »

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.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

On the properties select whether you want it to appear and give it the time.

Select the condition in the link.
paddu
Premium Member
Premium Member
Posts: 232
Joined: Tue Feb 22, 2005 11:14 am
Location: California

Post by paddu »

can u tell me how to send the message if i did not get the file and even if i get the file how to send message.
let me plz know how to set the time
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sachinkc
Participant
Posts: 34
Joined: Sat Apr 17, 2004 11:39 am
Location: USA

Re: wait for a file

Post by sachinkc »

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.
Rgrds & Cheers!

Sachin
sachin@operamail.com
~Life always finds a way~
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Re: wait for a file

Post by roy »

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?!
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
Image
sachinkc
Participant
Posts: 34
Joined: Sat Apr 17, 2004 11:39 am
Location: USA

Re: wait for a file

Post by sachinkc »

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
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?!
Rgrds & Cheers!

Sachin
sachin@operamail.com
~Life always finds a way~
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Re: wait for a file

Post by roy »

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
the fact you have DS should encorage you to be an expert.
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 :oops: )

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
Image
sachinkc
Participant
Posts: 34
Joined: Sat Apr 17, 2004 11:39 am
Location: USA

Re: wait for a file

Post by sachinkc »

peace :)
roy wrote:
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
the fact you have DS should encorage you to be an expert.
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 :oops: )

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 :?
Rgrds & Cheers!

Sachin
sachin@operamail.com
~Life always finds a way~
paddu
Premium Member
Premium Member
Posts: 232
Joined: Tue Feb 22, 2005 11:14 am
Location: California

thanks

Post by paddu »

hey friends ,

sorry it is too late to tell u guys thanks
anyways some more questions .
Post Reply