Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

if a step abends abnoramally, will it generates RC?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: if a step abends abnoramally, will it generates RC?
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    Post subject:
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    Post subject: Re: if a step abends abnoramally, will it generates RC?
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    Post subject:
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    Post subject:
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    Post subject: Re: if a step abends abnoramally, will it generates RC?
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm
This topic is locked: you cannot edit posts or make replies. JCL MULTIPLE STEP EXECUTION QUERY Susanta JCL & VSAM 18 Sat Jul 30, 2016 1:17 pm
No new posts Single step utility for compare and u... ramprakashn JCL & VSAM 5 Fri Apr 29, 2016 3:43 pm
No new posts Compilation Error in Translation Step. amitc23 CICS 4 Tue Mar 01, 2016 12:24 pm
No new posts Extract specific step spool data enrico-sorichetti JCL & VSAM 1 Thu Feb 04, 2016 9:48 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us