View previous topic :: View next topic
|
Author |
Message |
Sachin Ghadage
New User
Joined: 06 Nov 2009 Posts: 3 Location: pune
|
|
|
|
Hi All,
I need help in JCl.
In my job card has condition:-
// COND=((10,EQ),(99,EQ),(20,EQ))
So any of the step got RC 10 or 99 or 20 then job stops at that step.My requirement is once job stops I need to send Email notification to concerned email ID.I also have Email step code.But problem is how to put it in PROC.Because once job stops it won't execute subsequent steps.
I tried this way:
If RC.50 = 99
email step
End.
But this didn't work.Obviously because it won't execute once job card condition satisfied.and it bypass remaining steps...
Removing job card contions and putting infront of respective steps is not the solution bcause there are so many steps in Proc.
Please help.
Thanks,
vaishali |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Quote: |
So any of the step got RC 10 or 99 or 20 then job stops at that step |
Job doesn't "stop at that step" because of the cond codes - it bypasses the step and will then perform any check on the next step(s). If there are no further steps eligible to execute, then execution stops.
What does "IF RC.50 = 99" mean? Have you a step named 50 ?
Garry. |
|
Back to top |
|
|
karisurya
New User
Joined: 02 Aug 2007 Posts: 64 Location: Bangalore
|
|
|
|
As carol said if a condition is satisfied job will skip the step and not stop there.
In your post you specified you tried to test with below code
Quote: |
If RC.50 = 99
email step
End.
|
R u sure the return code is 99 for previous step.
Other than chekcing the Step name, In the condition code you are checking 3 values and you are testing with one value. The testing will fail if you dont generate appropriate return code which you are checking.
Check it out and let us know if u need further help. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
when COND is specified on the JOBCARD the job stops executing as soon as any test is satisfied.
Quote: |
The COND parameter is used to specify the return code tests the
system uses to determine whether a job will continue processing.
The COND parameter on the JOB statement is global in scope for the
entire job.
Before each job step is executed, MVS performs the COND parameter
tests against the return codes from one or more previously completed
job steps. If none of these tests are satisfied, the system
executes the job step; if any test is satisfied, the system skips
ALL remaining job steps and terminates the job immediately.
|
Gerry |
|
Back to top |
|
|
karisurya
New User
Joined: 02 Aug 2007 Posts: 64 Location: Bangalore
|
|
|
|
OOPS, My mistake most of the time i use COND parameter at step level so carried away. If COND parameter is specified in JOBCARD the job stops when condition matches.
Here is what i learnt from IBM Manual about COND over rides
Quote: |
Overrides
z/OS V1R10.0 MVS JCL Reference
SA22-7597-12
If you code the COND parameter on the JOB statement and on one or more of the job's EXEC statements, and if a return code test on the JOB statement is satisfied, the job terminates. In this case, the system does not process any subsequent EXEC statement COND parameters.
If the tests on the JOB statement are not satisfied, the system then performs the return code tests on the EXEC statement. If a return code test is satisfied, the step is bypassed.
|
|
|
Back to top |
|
|
Sachin Ghadage
New User
Joined: 06 Nov 2009 Posts: 3 Location: pune
|
|
|
|
Yah,
that means
If RC.STEP50 = 99
email step
End.
But what to do?.. Is there any solution to send email once job stops because of any of the jobcard conditions? |
|
Back to top |
|
|
|