View previous topic :: View next topic
|
Author |
Message |
Vivek Anand
New User
Joined: 04 Jun 2013 Posts: 19 Location: India
|
|
|
|
Hi,
I have the below requirement for a job with 3 steps wherein the 3rd step must be conditionally executed.
The condition is: Execute step3 if the RC from step1 and step2 is either 0 or 8. Skip if the RC is anyother value.
Is it possible to achieve this using COND parameter. Based on my understanding of COND parameter, i could not figure out how to code this.
I also considered using IF statement but could not figure out how to achieve this (as i understand 'IF' statement checks the highest.RC and not return code of every step).
Could any one help me with this. |
|
Back to top |
|
|
Vivek Anand
New User
Joined: 04 Jun 2013 Posts: 19 Location: India
|
|
|
|
I realised that i have not described the requirement quite correctly. The number of steps in the job are not necessarily 3. It can be any number. My requirement is that the last step should execute only if the RC from all the previous steps are either RC1 or RC2. Hope i have described the requirement clearly. |
|
Back to top |
|
|
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
You can specify a stepname on your IF statement, e.g.;
// IF STEP010.RC EQ 1 THEN DO |
|
Back to top |
|
|
Vivek Anand
New User
Joined: 04 Jun 2013 Posts: 19 Location: India
|
|
|
|
Hi David,
Thanks, the issue is that the number of steps in the job are not fixed. Kindly see my second post where i have clarified the requirement. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
I would say that it is impossible using COND= processing |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
One way to accomplish what you want is to change the process to "record" the RC of each step in a file and then, in the last step, check to see if the run should end or not. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
I concur with Mr. Scherrer, although checking the accumulated completion codes in the penultimate step and returning a single CC to drive the processing thereafter might be clearer. |
|
Back to top |
|
|
Vivek Anand
New User
Joined: 04 Jun 2013 Posts: 19 Location: India
|
|
|
|
Thank you all for your valuable inputs. |
|
Back to top |
|
|
|