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

Return codes-Normal & Abnormal termination of a step


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

New User


Joined: 24 Oct 2023
Posts: 22
Location: India

PostPosted: Sun Nov 12, 2023 7:43 pm
Reply with quote

Hello,

According to disposition paramter in JCL,second and third parm is based on normal & abnormal termination of a step.

To my understaning,RC 0 is considered as normal termination & RC 8 is considered as abnormal termination.

How about RC 4? I know it is warning but will the system consider it as normal or abnormal termination?

What are all the rc's considered normal & abnormal?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Sun Nov 12, 2023 8:33 pm
Reply with quote

What do the JCL manuals tell you?
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Mon Nov 13, 2023 1:45 am
Reply with quote

Any return code can be good and rc 0 could be bad, it is up to the program issuing the code what to set. Abnormal termination, on the other hand, is a system- or user abend.
There is a historic reason for those return codes devisible by 4, it has to do with branch tables, which I will not go into now.
Back to top
View user's profile Send private message
Akil

New User


Joined: 24 Oct 2023
Posts: 22
Location: India

PostPosted: Thu Nov 16, 2023 11:29 pm
Reply with quote

But i have not set(abnormal termination codes) anywhere in program/job.Then how come it was considered as abnormal termination by jcl.

I gave new,catlg,delete and I got rc 8 and file was deleted.And you mentioned abnormal termination is system or user abend.but rc 8 is not user or system abend right?

jcl manual-does not tell about normal or abnormal termination codes
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Fri Nov 17, 2023 2:59 am
Reply with quote

Step condition codes are defined by standard as 0 -- normal; 4 - warning; 8 (or higher) - error

Step condition codes and abends have a complex relationship. Many times, you are best off to just accept the behavior you find without necessarily understanding it in any great depth.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Fri Nov 17, 2023 5:48 am
Reply with quote

re: "But i have not set"

To be clear, you do not set it in the JCL. The JCL calls a program and the program determines if it ran successfully or not.

The standard convention is for the program to set the return code in register 15 as one of the last things it does. IBM utilities follow that convention, but a local program might have garbage in the register.
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Fri Nov 17, 2023 1:45 pm
Reply with quote

"But i have not set(abnormal termination codes) anywhere in program/job."
Are you sure that you don't have COND parameter in the JOB statement? We need to see the job and output, otherwise this thread is just guesswork.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

PostPosted: Fri Nov 17, 2023 7:15 pm
Reply with quote

Willy Jensen wrote:
"But i have not set(abnormal termination codes) anywhere in program/job."
Are you sure that you don't have COND parameter in the JOB statement? We need to see the job and output, otherwise this thread is just guesswork.

I suggested the TS to present here all detailed information about his code, and his results, but my post has been kindly deleted by moderators.

So far it looks like car repair by phone.
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 How to append a PS file into multiple... JCL & VSAM 3
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
No new posts Forcing a step to run (even if abended) JCL & VSAM 8
No new posts AI writing DFSORT, REXX codes.. All Other Mainframe Topics 3
Search our Forums:

Back to Top