View previous topic :: View next topic
|
Author |
Message |
abhi2879
New User
Joined: 27 May 2005 Posts: 4
|
|
|
|
I have to implement a JCL driven email using BATCHTMP.But this is the 5th step in the Job and i need execute this step on failure on any step, Unabel to set it up using COND=XXXX steps. PLease help |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
COND=EVEN should make it work. |
|
Back to top |
|
|
abhi2879
New User
Joined: 27 May 2005 Posts: 4
|
|
|
|
My criteria is if any step fails then only the BATCHTMP step shud execute. COND=EVEN will execute in any COndition |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Guess it should be COND=ONLY then. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I think that if it was up to me, I'd rather use IF/THEN statements so I could handle both step abends and steps with non-acceptable return codes:
Code: |
// IF (ABEND=TRUE | RC > 4) THEN
//BATCHTMP EXEC PGM=BATCHTMP
//...
// ENDIF
|
|
|
Back to top |
|
|
abhi2879
New User
Joined: 27 May 2005 Posts: 4
|
|
|
|
My constraints are
1. If STEP010 fails STEP020 will not be executed, but STEP030 which is the BATCHTMP step should be executed to send the mail.
2. If all the steps are with RC=0, the BATCHTMP Step should not be executed.
Is there any cond where in if a step fails, the successive step instead of checking the RC and not executing ,it will check the RC and transfer the JCL execution control to the particular step which has the BATCHTMP step.
I know i am asking for more |
|
Back to top |
|
|
jkbytes
Active User
Joined: 19 Feb 2005 Posts: 139 Location: South Africa
|
|
|
|
Hi,
You can check for the return code of STEP010 IN STEP020 using a condition or you can also use an if statement as superk told for STEP020, and have a COND=ONLY IN STEP030.
I guess this would work fine for you. |
|
Back to top |
|
|
Suresh Antony Warnings : 1 New User
Joined: 27 May 2005 Posts: 3 Location: Bangalore
|
|
|
|
Hi Abhi,
Your question is that u need to execute 5th step(BATCHTMP) in the job only if any of the above steps fails...
If so... u can use the condition in the 5ht step as COND=(0,LE).. i think it should work
Thanks,
Suresh Antony |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Ahbi,
If you want an appropriate ans to your ques you have to invest the time to precicely define the problem.
Show us the JCL. Tell us exactly what "fails" means - a certain RC (GT 0;4, 12, and 16?); an abend; both? Multiple examples of what the solution should accomplish can be of help.
Expecting people supply solutions based on inadequate info and then rejecting them because they don't address a scenerio you neglected to mention is rude, because it expects them to spend more time on the problem than you do. |
|
Back to top |
|
|
abhi2879
New User
Joined: 27 May 2005 Posts: 4
|
|
|
|
I am sorry if my post was rude and was no detailed.
My condition is if the RC of any step is greater than Zero, the jcl should execute only the last step which is the BATCHTMP step.
Sorry again :!: |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
What do you want to do if any step abends? |
|
Back to top |
|
|
|