help in dsjob command

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
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

help in dsjob command

Post by pandeesh »

I am creating a unix for triggering multiple instances of a job.

I am using -jobstatus in dsjob command.
It causes the second instance to wait until the first instance finish.

Once the first instance finishes, the second instance starts.

But i want to run both the instances and want the job status of both jobs once they finished,.

Becuase if any of the instances abort, i need to trigger the mail.

Please help me to achieve this.

Thanks
pandeeswaran
samyamkrishna
Premium Member
Premium Member
Posts: 258
Joined: Tue Jul 04, 2006 10:35 pm
Location: Toronto

Re: help in dsjob command

Post by samyamkrishna »

why dont you build a sequence for it.
it will be easier
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

Just i want to try it in unix script.
pandeeswaran
SURA
Premium Member
Premium Member
Posts: 1229
Joined: Sat Jul 14, 2007 5:16 am
Location: Sydney

Post by SURA »

Did you pass the jobname.invocation id ?
arvind_ds
Participant
Posts: 428
Joined: Thu Aug 16, 2007 11:38 pm
Location: Manali

Post by arvind_ds »

Sura has given a good idea !!!
Arvind
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Are you really going to "create a unix" just for that? Or just create a UNIX shell script?
:lol:

You need to run dsjob with neither -wait nor -jobstatus (which you could have determined by searching DSXchange); your script must then periodically check the status of each job until the status of both is no longer "running", then react appropriately according to what those status values are.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

Yes Ray! I have created a unix shell script for my requirement.

I havent used -wait as well as -jobstatus.

I am checking manually and resetting the job if required.

Thanks
pandeeswaran
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So rather than checking manually, build a -jobstatus check loop into your script where you parse out the result. When both have completed, based on what happened, either exit gracefully or send out your alert email(s).
-craig

"You can never have too many knives" -- Logan Nine Fingers
pandeesh
Premium Member
Premium Member
Posts: 1399
Joined: Sun Oct 24, 2010 5:15 am
Location: CHENNAI, TAMIL NADU

Post by pandeesh »

But however there might be some time delay.
Since i am not sure how long the job will take to finish, i am checking in the loop for every 100 secs and once it's finished sending the mail

Thanks
pandeeswaran
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Of course. So, resolved?
-craig

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