View previous topic :: View next topic
|
Author |
Message |
swastik
New User
Joined: 14 May 2007 Posts: 3 Location: Minnetonka
|
|
|
|
I have a situation, where I have to run a particular job (JOB1) in two different scenarios. One is when the header job(A) will create an empty file (RC=1) and another when it will create an non empty file (RC=0).
RC=1
(empty o/p file)
A -----------------> JOB1
|
| RC=0
| (Non empty o/p file)
|
B
|
C
|
JOB1
Could anybody suggest me any preferable solution? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forums
I believe you can accomplish what you want by using COND= on the EXEC statements after the first step has run and set the condition code.
There may be no CA-7 change required. |
|
Back to top |
|
|
swastik
New User
Joined: 14 May 2007 Posts: 3 Location: Minnetonka
|
|
|
|
My intention here is to trigger two different jobs(B and JOB1) from a single header job (A). |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Thet may be your current intention, but is there some business/technical reason that these 3 processes not be run conditionally in the same job? |
|
Back to top |
|
|
swastik
New User
Joined: 14 May 2007 Posts: 3 Location: Minnetonka
|
|
|
|
Yes. In the first phase if I have an empty output file then it should by pass the process (B->C), but if the the output file is non empty then it should execute the process(B->C) to get the required input file for the JOB1. Hope this clears the situation.
Thanks for your co-operation. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome.
My question still remains - why is this better served using 3 jobs that have to be maintained rather than a single job that conditionally executes the needed steps?
If JOB1 is and must remain a totally separate job, "this" job could be set up to create the needed output conditionally. Once this job completes (either way), the file would be created. JOB1 could be defined as a successor job in the schedule depending on the successful completion of "this" job. |
|
Back to top |
|
|
|