View previous topic :: View next topic
|
Author |
Message |
Akil
New User
Joined: 24 Oct 2023 Posts: 22 Location: India
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
What do the JCL manuals tell you? |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 724 Location: Denmark
|
|
|
|
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 |
|
|
Akil
New User
Joined: 24 Oct 2023 Posts: 22 Location: India
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2583 Location: Silicon Valley
|
|
|
|
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 |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 724 Location: Denmark
|
|
|
|
"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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2117 Location: USA
|
|
|
|
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 |
|
|
|