Checking the jobs in runnable state

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
kool_cons
Participant
Posts: 68
Joined: Thu Jul 07, 2005 3:41 pm

Checking the jobs in runnable state

Post 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.
chucksmith
Premium Member
Premium Member
Posts: 385
Joined: Wed Jun 16, 2004 12:43 pm
Location: Virginia, USA
Contact:

Post by chucksmith »

Why not just let your JobActivity stage use the Reset if required the run action?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

The shell script to reset and then run is viewtopic.php?t=93365&highlight=RunJob
Mamu Kim
kool_cons
Participant
Posts: 68
Joined: Thu Jul 07, 2005 3:41 pm

Post by kool_cons »

Thanks guys.. you are helping a lot.
Eric
Participant
Posts: 254
Joined: Mon Sep 29, 2003 4:35 am

Re: Checking the jobs in runnable state

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Which is why the script does a 'reset' instead. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
kool_cons
Participant
Posts: 68
Joined: Thu Jul 07, 2005 3:41 pm

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post 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.
Mamu Kim
kool_cons
Participant
Posts: 68
Joined: Thu Jul 07, 2005 3:41 pm

Post by kool_cons »

i am new to datastage.so i am getting wierd questions.i am sorry guys.i appreciate ur help
Post Reply