Check for File arrival

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
ashish10mca
Participant
Posts: 9
Joined: Sat Oct 10, 2009 6:13 am

Check for File arrival

Post by ashish10mca »

Hi,


Please tell me how can i do this.. i have to process a file whenever its arrived
to our server in a day.If two file arrives i have to funnel them.

Problem i am facing that i dont know which time the file arrive so whenever file arrive i have to run the Job.

Scheduling the job 24 hours in a day is an option but it will degrade the os performance and datastage performance so suggest some optimal way.


Thanks
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Re: Check for File arrival

Post by qt_ky »

ashish10mca wrote:whenever file arrive i have to run the Job.
In that case, you're not likely to need to funnel two files in the same job at the same time.

Schedule a sequence job and use the Wait For File stage. It's not going to pose a significant burden on the OS or DataStage performance. If you design it differently, perhaps using polling and creative scheduling, then your going to spend more development time, which gets more expensive.

If your server hardware and OS are already at the limit of what they can handle, then you and your team have bigger problems to solve before adding more jobs of any kind.
Choose a job you love, and you will never have to work a day in your life. - Confucius
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Re: Check for File arrival

Post by qt_ky »

ashish10mca wrote:Scheduling the job 24 hours in a day is an option but it will degrade the os performance and datastage performance so suggest some optimal way.
Try testing that option to find out exactly how much it degrades performance. I think it would be difficult to measure.

Then load test it. How many such jobs does it takes to actually degrade performance?
Choose a job you love, and you will never have to work a day in your life. - Confucius
jerome_rajan
Premium Member
Premium Member
Posts: 376
Joined: Sat Jan 07, 2012 12:25 pm
Location: Piscataway

Transfer Dependency to Scheduler

Post by jerome_rajan »

Hi,

Why don't you leave that job to the scheduler. So if you are using AutoSys to schedule your jobs, you may create a file watcher job in AutoSys that can run for as much time as you want. The moment it finds the files you are looking for, it will go into success state. Then you can set your job to trigger on the success of the file watcher AutoSys job.
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn

Life is really simple, but we insist on making it complicated.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Assuming they have a decent Enterprise scheduler, that is. We have to assume, unless specifically noted otherwise, that the 'scheduler' in question here is DataStage itself and for a repeating schedule on a UNIX system that means via cron.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jerome_rajan
Premium Member
Premium Member
Posts: 376
Joined: Sat Jan 07, 2012 12:25 pm
Location: Piscataway

Post by jerome_rajan »

Not too well versed with the native scheduler but does it not have a 'File Watcher' equivalent? Pardon my lack of knowledge with the scheduling department.
Jerome
Data Integration Consultant at AWS
Connect With Me On LinkedIn

Life is really simple, but we insist on making it complicated.
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

That would be the Wait For File stage I mentioned on the first reply... It's built into DataStage, so there's no need for an external product to do the same thing.
Choose a job you love, and you will never have to work a day in your life. - Confucius
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

There is no 'native' DataStage scheduler. What is has is an interlude / interface to the standard scheduling utilities of the underlying O/S. So, for a UNIX server, when you are looking at or manipulating the schedule in Director, you are seeing the cron entries it has automagically created for you. Well... cron for any repeating schedules or at for any one-time schedules. On a Windows server it leverages the standard Windows at scheduler.

Eric is talking about scheduling in a Sequence job and having the first object in that sequence be a Wait For File stage.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You're right that there's no DataStage scheduler in version 7, which is the version indicated by the OP.

However, Information Server does have a scheduling service in version 8. But that scheduling service does not include a "file watcher" equivalent.

Other than multiple Wait For File activities in a sequence, there's no real built-in capability to wait for multiple files.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

ray.wurlod wrote:However, Information Server does have a scheduling service in version 8.
Since the original release, or was it added along the way?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

8.0 as far as I am aware.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply