IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

if a step abends abnoramally, will it generates RC?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sreenivas_mf

New User


Joined: 18 Jul 2006
Posts: 5
Location: hyd

PostPosted: Tue Jul 18, 2006 10:23 pm
Reply with quote

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
View user's profile Send private message
red_roses

New User


Joined: 31 Oct 2005
Posts: 27

PostPosted: Tue Jul 18, 2006 11:14 pm
Reply with quote

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
View user's profile Send private message
sreenivas_mf

New User


Joined: 18 Jul 2006
Posts: 5
Location: hyd

PostPosted: Wed Jul 19, 2006 12:10 am
Reply with quote

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
View user's profile Send private message
red_roses

New User


Joined: 31 Oct 2005
Posts: 27

PostPosted: Wed Jul 19, 2006 10:45 am
Reply with quote

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
View user's profile Send private message
diwa_thilak

Active User


Joined: 13 Jul 2006
Posts: 205
Location: At my desk

PostPosted: Wed Jul 19, 2006 1:07 pm
Reply with quote

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
View user's profile Send private message
sureshchoudey

New User


Joined: 16 Sep 2005
Posts: 12

PostPosted: Wed Jul 19, 2006 6:37 pm
Reply with quote

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
View user's profile Send private message
parsesource

New User


Joined: 06 Feb 2006
Posts: 97

PostPosted: Thu Jul 20, 2006 3:35 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts Cobol program with sequence number ra... COBOL Programming 5
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
No new posts Forcing a step to run (even if abended) JCL & VSAM 8
Search our Forums:

Back to Top