View previous topic :: View next topic
|
Author |
Message |
sreenivas_mf
New User
Joined: 18 Jul 2006 Posts: 5 Location: hyd
|
|
|
|
hi,
this is sreenivas,
here is my problem
step1 exec pgm=disp1
step2 exec pgm=disp2
step3 exec pgm=disp3
step4 exec pgm=disp4,cond=(4,LT,step1)
1) what happends if sep1 abbends? is there any chance to execute step4?
2) what is an RC? pls explain broadly.
3) if the step abends abnormally, is it generates any RC?
Thanks for advance
sreenivas |
|
Back to top |
|
|
red_roses
New User
Joined: 31 Oct 2005 Posts: 27
|
|
|
|
1) If any step abends in a JCL then the remaining steps are not executed.
the only condition when any of the subsequent steps will be executed is if COND=EVEN or COND=ONLY is coded.
COND=EVEN will execute even if any of the prior steps have abended
and COND=ONLY will execute only if a PRIOR step have abended.
in your example COND=EVEN will work.
2) RC stand for Return code........ does it need any more explaination..???
3)If a step abends, there will be a RC for it, if the abending pgm does not override it then the JCL will assign one depending on the error n the Severity. |
|
Back to top |
|
|
sreenivas_mf
New User
Joined: 18 Jul 2006 Posts: 5 Location: hyd
|
|
|
|
hi red_roses,
thanks for ur reply,
If a step abends, there will be a RC for it, if the abending pgm does not override it then the JCL will assign one depending on the error n the Severity.
step1 exec pgm=disp1
step2 exec pgm=disp2
step3 exec pgm=disp3
step4 exec pgm=disp4,cond=(4,LT,step1)
as u said, in the above example, assume that the step1 abends, then it generates an RC, which is the value 3. in this case the step 4 will run, am i right or not?
if i am not, pls correct me
thanx |
|
Back to top |
|
|
red_roses
New User
Joined: 31 Oct 2005 Posts: 27
|
|
|
|
sreenivas let me correct my reply for the thrid point.
A step that ABEND?s issues no return code because a program always issues a return code (conditionally or by default) if it reaches the end of its execution and intentionally returns control to the system. When an ABEND occurs, the program loses control instantly. And is evicted from from execution by the system. As a result when a step ABEND?s no return code exists ( a completion code exists). An attempt to interogate the return code of such a step in the COND parameter of a step will be ignored until it contains EVEN or ONLY. |
|
Back to top |
|
|
diwa_thilak
Active User
Joined: 13 Jul 2006 Posts: 205 Location: At my desk
|
|
|
|
Hi,
1. If the job abends the subsequent steps are skipped or not executed.
2. RC is the return code; initialzed to zero
ABEND indicates an abend occurred (true or false).
IF ABEND THEN
tests true when an abend occurred on any previous job step
^ABEND indicates no abend occurred (true or false )
3. I think every step will give a return code. If the job abends based on the severity the return code is set for the step.
Correct me if i am wrong.
Thanks,
Diwakar
Nobody is perfect. I am Nobody |
|
Back to top |
|
|
sureshchoudey
New User
Joined: 16 Sep 2005 Posts: 12
|
|
|
|
Hi Sreenivas,
1. if step1 abends ,4th step won't be run, if condition is true the step bypass otherwise it will be run.
2. every job retun code is there(R.C) .R.C shows severity of the job |
|
Back to top |
|
|
parsesource
New User
Joined: 06 Feb 2006 Posts: 97
|
|
|
|
diwa_thilak wrote: |
Hi,
2. RC is the return code; initialzed to zero
ABEND indicates an abend occurred (true or false).
3. I think every step will give a return code. If the job abends based on the severity the return code is set for the step.
Correct me if i am wrong.
|
RC is initialized to zero only for IF statements. a COND Statement on the 1st step is always evaluated to false,because a prev. RC does not exist (=step gets executed)
a step not executed (FLUSHED) does not have a RC. a statement refering to such a RC is always evaluated to false. |
|
Back to top |
|
|
|