sheduling

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
vinodhraj
Participant
Posts: 53
Joined: Mon Sep 12, 2005 6:51 am

sheduling

Post by vinodhraj »

Hi,

I need a unix script to schedule 5 jobs at a particular time in sequence one after another and the status should be updating a table which consists of table name and status as attributes.

Even if one warning comes, the status should be updated as failed and the job report and job logs have to be e-mailed to the users.

Thanks

Vinod
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Do you have a specific question, or are you asking if someone has developed something similar that you would like to obtain?
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
vinodhraj
Participant
Posts: 53
Joined: Mon Sep 12, 2005 6:51 am

Post by vinodhraj »

hi Kenneth Bland,

I know these steps has to be followed..

1. dsjob -run <<project name >> <<job name>>
2. dsjob -report <<project name >> <<job name>>
3. dsjob -logdetail <<project name >> <<job name>>
4. (cat text.txt; uuencode /tmp/reports/prod_report.$date
prod_dailyreport.txt) |mailx -s "Daily -UNIX Report"

I don't know how to update the status in the status table.

Thanks

vinod
sanjay
Premium Member
Premium Member
Posts: 203
Joined: Fri Apr 23, 2004 2:22 am

Post by sanjay »

Hi
its a oracle database write a oracle procedure to update status . and call procuedure in unix script.

Snjay
vinodhraj wrote:hi Kenneth Bland,

I know these steps has to be followed..

1. dsjob -run <<project name >> <<job name>>
2. dsjob -report <<project name >> <<job name>>
3. dsjob -logdetail <<project name >> <<job name>>
4. (cat text.txt; uuencode /tmp/reports/prod_report.$date
prod_dailyreport.txt) |mailx -s "Daily -UNIX Report"

I don't know how to update the status in the status table.

Thanks

vinod
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

If you state the database of choice, then it will be as simple as using the command line interface to that database. For example, Oracle has sqlplus which can take a .sql script name as an argument on the command line. By generating a .sql script dynamically, you can invoke sqlplus to execute the .sql script. If you are adept at shell scripting, you could even pass the sql commands to the command line sqlplus using indirection within the script.
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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

There's all kinds of ways to accomplish this. Ken and Sanjay have touched upon a couple of different approaches. Something else to think about...

If you are going to use the command line options to capture the results of your job runs, consider redirecting the output of those commands to flat files. More than likely, you won't need any special procedures or scripts to 'process' them but could leverage normal Server jobs to do that. It shouldn't be all that difficult to parse out the information you need from them, job name and status in particular, and then get that data inserted into your status table via one of the plug-in database stages.

You could also do a search here for mention of the famous ETLStats job collection from Kim Duke. It may be able to give you pretty much exactly what you need 'out of the box' or at least give you an enormous leg up with code and processes you can leverage. All freely available from his website.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply