Source Files not available - error handling

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
anu123
Premium Member
Premium Member
Posts: 143
Joined: Sun Feb 05, 2006 1:05 pm
Location: Columbus, OH, USA

Source Files not available - error handling

Post by anu123 »

Hi all,

I have 3 different source files which are supposed to be FTPed to my server every month, then I load them into 3 seperate staging tables. From 3 staging tables,after doing some math, i need to load final table every month.

My requirement is, I need to look whether I have received all the 3 files then only I need to move further, I mean do the match and load final table.

wondering any of you implemented this functionality before....?

thanks in advance,
Thank you,
Anu
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

There's no functionality inherent in the products for monitoring file availability. There are various methods, some using Unix scripts, others using DS BASIC or Sequencers, for detecting the presence of files. No matter what, you will program your own solution. As far as what I would do, I would write a watcher script to use a parameter driven list of files and their expected arrivals and use that watcher script to notify and act accordingly to either the presence or lack there of a given file.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
anu123
Premium Member
Premium Member
Posts: 143
Joined: Sun Feb 05, 2006 1:05 pm
Location: Columbus, OH, USA

Post by anu123 »

kcbland wrote:There's no functionality inherent in the products for monitoring file availability. There are various methods, some using Unix scripts, others using DS BASIC or Sequencers, for detecting the presence of files. No matter what, you will program your own solution. As far as what I would do, I would write a watcher script to use a parameter driven list of files and their expected arrivals and use that watcher script to notify and act accordingly to either the presence or lack there of a given file.

thanks for the quick reply Bland.

Could please provide some more info. on "how to do this in Sequencers'..?Even my jobs are completely parameterized.

Is there any DS Documentation, where I can find some info.?
Thank you,
Anu
rasi
Participant
Posts: 464
Joined: Fri Oct 25, 2002 1:33 am
Location: Australia, Sydney

Post by rasi »

Anu

While creating Sequence you have a plug-in called Wait_For_File_Activity this will help you to wait for the file to appear or disappear on defined folder.
Regards
Siva

Listening to the Learned

"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post by I_Server_Whale »

Hi Anu,


You can create a "Sequence job" which has three 'wait-for-file activity stages, followed by a 'job sequencer' stage, followed by three 'job activity' stage for running the jobs which load the staging tables and then a final 'job activity' stage for running the job to load your target table.

It may be the case that you may have more jobs to run to load the staging as well as your target tables. In that case, you need to include all of those jobs by adding additional 'job activity' stages appropriately.

Make sure that the mode in your 'job sequencer' stage is set to all, there by confirming the existence of all three source files.

I have created a sample design. Please feel free to download it from:

Image

http://s39.yousendit.com/d.aspx?id=22IH ... BJ0NR8PMTP

Thanks,
Naveen.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
anu123
Premium Member
Premium Member
Posts: 143
Joined: Sun Feb 05, 2006 1:05 pm
Location: Columbus, OH, USA

Post by anu123 »

naveendronavalli wrote:Hi Anu,


You can create a "Sequence job" which has three 'wait-for-file activity stages, followed by a 'job sequencer' stage, followed by three 'job activity' stage for running the jobs which load the staging tables and then a final 'job activity' stage for running the job to load your target table.

It may be the case that you may have more jobs to run to load the staging as well as your target tables. In that case, you need to include all of those jobs by adding additional 'job activity' stages appropriately.

Make sure that the mode in your 'job sequencer' stage is set to all, there by confirming the existence of all three source files.

I have created a sample design. Please feel free to download it from:

Image

http://s39.yousendit.com/d.aspx?id=22IH ... BJ0NR8PMTP

Thanks,
Naveen.



Hey Naveen,

It looks great..thanks for your time and .pdf..
I will work on it and let u update....
Thank you,
Anu
Post Reply