The requirement is to pass the output value of the routine to the next activity, based on the value of the output.
Routine calculates the link count of a particular link of a job. I calculate through an after job subroutine( after job successfully completes).
I have to execute the job based on the link count.
If the linkcount =0 then execute the job
Else if link count > 0 then stop the sequence flow.
how to do this in Sequencer?
Trigger the next activity based on the output of routine
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What does the after-job subroutine do with the result? Simply have the sequence read it from there. Ideally the subroutine will write the result into the job's User Status area.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 536
- Joined: Thu Oct 11, 2007 1:48 am
- Location: Bangalore
Hi Suja,
Below could be a Sequence design of your requriment:-
JobActivity----->Nested Condition ---------> Job
-----------> Stop seq flow
In nested condition you should calculates the link count of a particular link of a jobActivity. Write below Expression in nested condition:-
LinkStopSeq=Routinename(Jobactivity.Jobname,"StageName","linkName")>0
LinkExeJob=Otherwise
I hope this will work.
Below could be a Sequence design of your requriment:-
JobActivity----->Nested Condition ---------> Job
-----------> Stop seq flow
In nested condition you should calculates the link count of a particular link of a jobActivity. Write below Expression in nested condition:-
LinkStopSeq=Routinename(Jobactivity.Jobname,"StageName","linkName")>0
LinkExeJob=Otherwise
I hope this will work.
Thanks
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
Do I need to use the nested activity? Can the logic be acheived as below.
Job activity1 ------------------------------> Job activity 2
In the triggers of the Job activity can I directly call the DSGetLinkInfo routine
1) LinkStopSeq: Custom( conditional) :
DSGetLinkInfo(Validation_Job,'Stage name', 'linkname', DSJ.LINKROWCOUNT) >0
2) LinkExeJob:Otherwise :
Just a thought, Will this work ?
Job activity1 ------------------------------> Job activity 2
In the triggers of the Job activity can I directly call the DSGetLinkInfo routine
1) LinkStopSeq: Custom( conditional) :
DSGetLinkInfo(Validation_Job,'Stage name', 'linkname', DSJ.LINKROWCOUNT) >0
2) LinkExeJob:Otherwise :
Just a thought, Will this work ?
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The Nested Condition activity is one that has no body, only triggers. There is nothing special about its triggers; the same triggers can be used on other kinds of activity as well.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
In the sequence job
Job activity1 ------------------------------> Job activity 2
In the triggers of the Job activity I call the DSGetLinkInfo routine
1) LinkExecSeq: Custom( conditional) :
DSGetLinkInfo(Validation_Job,'Stage name', 'linkname', DSJ.LINKROWCOUNT) =0
2) LinkExeJob:Otherwise : Email notification
the link count is zero, still the job2 is nto triggered. instead the email job is triggered .
Can anyone explain why the condition is not getting executed.? where is the issue
Job activity1 ------------------------------> Job activity 2
In the triggers of the Job activity I call the DSGetLinkInfo routine
1) LinkExecSeq: Custom( conditional) :
DSGetLinkInfo(Validation_Job,'Stage name', 'linkname', DSJ.LINKROWCOUNT) =0
2) LinkExeJob:Otherwise : Email notification
the link count is zero, still the job2 is nto triggered. instead the email job is triggered .
Can anyone explain why the condition is not getting executed.? where is the issue
Not a big fan of using routines like that directly in triggers, prefer the Routine Activity stage.
That routine requires a job handle, not a job name, hence the need for a wrapper routine to establish it, get the link count, detach from the job and then pass back the result.
That routine requires a job handle, not a job name, hence the need for a wrapper routine to establish it, get the link count, detach from the job and then pass back the result.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers