Job Sequence trigger usage based on data value 0 or !=0
Moderators: chulett, rschirm, roy
Job Sequence trigger usage based on data value 0 or !=0
Hi All,
I have two parallel jobs. First job that returns 0 or !=0 value in the file. The second job creates a data file.
What I am looking is to put a job sequenece with the below logic:
If the output data value of first job is 0, run the second job otherwise send an email.
Please suggest how to write this logic in the job sequence.
I have two parallel jobs. First job that returns 0 or !=0 value in the file. The second job creates a data file.
What I am looking is to put a job sequenece with the below logic:
If the output data value of first job is 0, run the second job otherwise send an email.
Please suggest how to write this logic in the job sequence.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard.
Run the first job. Then have an Execute Command activity read (cat) the file. Capture the output and extract the field containing the value in a custom trigger that determines whether the second job runs.
Run the first job. Then have an Execute Command activity read (cat) the file. Capture the output and extract the field containing the value in a custom trigger that determines whether the second job runs.
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.
Thanks Ray.
But is it possible to store the value in the variable in the first job and then use that in the cutom trigger of the activity job to run the second job or not.
But is it possible to store the value in the variable in the first job and then use that in the cutom trigger of the activity job to run the second job or not.
ray.wurlod wrote:Welcome aboard.
Run the first job. Then have an Execute Command activity read (cat) the file. Capture the output and extract the field containing the value in a custom trigger that determines whe ...
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
In parallel jobs you don't have the facility to write a value to a variable like server jobs using $userstatus (If you search for 'setuserstatus' you can find more on this). What you can do is: write the value into a file and use an execute command stage to 'cat' this value and according to the return value of this stage trigger the next activity.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I have used the execute command activity to run the shell script like:
cat /user/local/tmp/count.txt
count.txt can have values of 1 or 0
Then I put two Return value conditional expression = 1
and Return value conditional expression = 0
But it never goes to this condition 1 ie when the value in the count.txt is 1
I open the count.txt file and do not see any spaces or blanks.
How to check this 1 or 0 condition? Am I missing something?
cat /user/local/tmp/count.txt
count.txt can have values of 1 or 0
Then I put two Return value conditional expression = 1
and Return value conditional expression = 0
But it never goes to this condition 1 ie when the value in the count.txt is 1
I open the count.txt file and do not see any spaces or blanks.
How to check this 1 or 0 condition? Am I missing something?
rcdhawan wrote:Thanks JoshGeorge and Ray!
ray.wurlod wrote:In short, the answer to the second question is "no". ...
Thanks. I will try this. Where can I find the documentation of these statuses? That will be helpful for me. Regards to everyone.
chulett wrote:Give that boy a cee-gar!![]()
ReturnValue is the status of the command and zero indicates it ran without error. CommandOutput would capture whatever the command echo'd up on the screen / ...
Thanks. I will try this. Where can I find the documentation of these statuses? That will be helpful for me. Regards to everyone.
chulett wrote:Give that boy a cee-gar!![]()
ReturnValue is the status of the command and zero indicates it ran without error. CommandOutput would capture whatever the command echo'd up on the screen / ...
This is the output that i see in Director: Note one space line after 1.
--------
Reply=0
Output from command ====>
1
------
And the Custom Conditional expression is:
Execute_Command_7.$CommandOutput=1
When I execute this never gets true to run the 2nd job. Please advice
--------
Reply=0
Output from command ====>
1
------
And the Custom Conditional expression is:
Execute_Command_7.$CommandOutput=1
When I execute this never gets true to run the 2nd job. Please advice
chulett wrote:That's just standard UNIX / shell stuff. Pretty much all you need to worry about there is zero = good, not zero = not so good....