Page 1 of 1

Checking the jobs in runnable state

Posted: Mon Sep 12, 2005 6:22 pm
by kool_cons
hey guys,
I just want to check whether the jobs in a category are runnable state or not. i know we can check in datastage director but how can i do in unix using scripts. If they are in runnable state, i need to run the sequence or else need to compile the jobs and run the sequence. this is all has to be done in unix.
please help to write the script.

Posted: Mon Sep 12, 2005 7:14 pm
by chucksmith
Why not just let your JobActivity stage use the Reset if required the run action?

Posted: Mon Sep 12, 2005 7:54 pm
by ray.wurlod
WHY does it all have to be done in UNIX?!! :roll:

Parse the output from dsjob -jobinfo

Helping you to write the script, well, that's "professional services" and attracts a fee. Particularly since the requirement is regarded as silly.

Posted: Mon Sep 12, 2005 8:47 pm
by kduke
The shell script to reset and then run is viewtopic.php?t=93365&highlight=RunJob

Posted: Mon Sep 12, 2005 11:47 pm
by kool_cons
Thanks guys.. you are helping a lot.

Re: Checking the jobs in runnable state

Posted: Tue Sep 13, 2005 4:06 am
by Eric
kool_cons wrote:or else need to compile the jobs and run the sequence. this is all has to be done in unix.
You can't compile jobs from a Unix script.

Posted: Tue Sep 13, 2005 6:38 am
by chulett
Which is why the script does a 'reset' instead. :wink:

Posted: Tue Sep 13, 2005 11:39 am
by kool_cons
kDuke,
I have a question on your script for resetting a job. Your script will work for one job.but i want to do the same thing for a set of jobs in a category since it is messy to write the same thing for all the jobs. what could be included in the script to do this.

Posted: Tue Sep 13, 2005 4:12 pm
by ray.wurlod
The dsjob command does not have an option to return a list of jobs in a category. I think you've "lucked out" on this requirement.

Posted: Tue Sep 13, 2005 6:31 pm
by kduke
You can modify that script to reset and run any job. Ray is correct in saying to reset every job in a category is not worth it.

We do not mind helping you but try to be specific. Do not change your requirements in mid stream. We are doing this for fun. We do not get paid to answer these questions or do your job. When it becomes work and not fun then guys like Hester and Bland quit answering questions. Don't try to chase the rest of us off. We really do like to help. Make your best effort then ask when you get truly stuck. We will be glad to help.

Posted: Wed Sep 14, 2005 6:12 pm
by kool_cons
i am new to datastage.so i am getting wierd questions.i am sorry guys.i appreciate ur help