Hi,
I was asked in an interview "whats the difference between Return code and Condition Code"? I thought I knew it but I got confused with tese two, can you please help me with an explanation and when is what applicable? Appreciate any reply on this.
Thanks.
What is the diff between Return code and Condition code?
- Robert Sample
- Global Moderator
- Posts: 1895
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: What is the diff between Return code and Condition code?
A return code is passed from a called program back to the calling program. This can occur between two programs within a language or from the program to the operating system. A condition code only exists with JCL and represents a return code passed from the program to the operating system.
Re: What is the diff between Return code and Condition code?
That means Return-codes do not have a meaning away from programs?
- Robert Sample
- Global Moderator
- Posts: 1895
- Joined: Fri Jun 28, 2013 1:22 am
- Location: Dubuque Iowa
Re: What is the diff between Return code and Condition code?
Precisely -- without a program, how can you have a return code?
The utility IDCAMS somewhat muddies the water, though, as the command response code is referred to as a condition code. It is a return code from the command, though.
The utility IDCAMS somewhat muddies the water, though, as the command response code is referred to as a condition code. It is a return code from the command, though.
Re: What is the diff between Return code and Condition code?
Return code is the value in R15 when you return control to your caller.
Cond code (as in JCL) is the value in R15 (0 < cc < 4096) when your program terminates and returns control to z/OS.
Cond code (as in JCL) is the value in R15 (0 < cc < 4096) when your program terminates and returns control to z/OS.
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute