Page 1 of 1

condition in sequencer / jobs

Posted: Wed Jul 19, 2006 1:21 pm
by DS1
hello everyone,

I need to give conditions in the jobs/ sequences in such a way that based on the conditions it will execute one of three job.
This condition needs to be passed based on the value of one of the output columns of the previous job.
We are using DS 7.1/

Can anyone help me with this.

Thanks
DS1

Posted: Wed Jul 19, 2006 1:50 pm
by chulett
Well, technically that's what the Nested Condition stage is for as it's basically a user-defined 'branch' in your job flow. You can also manage this kind of thing with normal triggers.

Where does this 'value of one of the output columns of the previous job' that you need to branch based on end up? That's going to drive how difficult you make this. One suggestion would be to look into using the User Status area each job has, you can stash a value there and then any downstream job in a Sequence job can easily leverage it.

Posted: Wed Jul 19, 2006 1:58 pm
by DSguru2B
OR store that value in a hashed file keyed to a hardcoded value and then read that hashed file by UtilityHashLookup() routine in a Routine Activity Stage and branch the execution accordingly.

Posted: Wed Jul 19, 2006 2:01 pm
by DS1
thanks for the reply ,

my column is in a dataset.
does that make it easy / difficult ???

i tried using nested conditions, but am not sure of how to provide a condition and that too based on a column that is in the resulting dataset of the previous job.

Posted: Wed Jul 19, 2006 2:07 pm
by DSguru2B
a big :oops:
Sorry, my earlier solution wont work. I overlooked the fact that your on PX.
Sorry.

Posted: Wed Jul 19, 2006 2:12 pm
by DS1
DSguru2B wrote:a big :oops:
Sorry, my earlier solution wont work. I overlooked the fact that your on PX.
Sorry.
thats ok, but is there some way to make it work?

Thanks

Posted: Wed Jul 19, 2006 2:15 pm
by DSguru2B
Have you tried working with Craig's suggestion? Try it out.

Posted: Wed Jul 19, 2006 2:36 pm
by DS1
yes, i have given a thought to Craig's suggestions but i need some more help on it.
I have asked for some help in previous message ----

''''my column is in a dataset.
does that make it easy / difficult ???

i tried using nested conditions, but am not sure of how to provide a condition and that too based on a column that is in the resulting dataset of the previous job. '''''

It would be very helpful to know more

Thanks

Posted: Wed Jul 19, 2006 5:33 pm
by ray.wurlod
Be more thoughtful/specific about your requirement. You say that the branch is based on "a" value. Even though that value is in a Data Set, is it correct that it is nonetheless only a single value? So it would still be possible to use a job to extract that value and write it to a sequential file? (Tip: run this job using a single node configuration file - it only processes one row, so the other nodes would be idle.)

In that case, the solution above is appropriate but with minor changes. Instead of UtilityHashLookup via a routine activity you could use cat via an Execute Command activity to retrieve the stored value, and feed that via an Activity variable (CommandActivityName.$ReturnValue) into your Nested Condition activity's decision expression.