What is the diff between Return code and Condition code?

All sort of Mainframes Interview Questions.
Post Reply
bizzy007
New Member
Posts: 5
Joined: Wed Oct 15, 2014 10:25 pm

What is the diff between Return code and Condition code?

Post by bizzy007 »

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.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: What is the diff between Return code and Condition code?

Post by Robert Sample »

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.
bizzy007
New Member
Posts: 5
Joined: Wed Oct 15, 2014 10:25 pm

Re: What is the diff between Return code and Condition code?

Post by bizzy007 »

That means Return-codes do not have a meaning away from programs?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: What is the diff between Return code and Condition code?

Post by Robert Sample »

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.
DL1
New Member
Posts: 3
Joined: Tue Nov 18, 2014 1:50 pm

Re: What is the diff between Return code and Condition code?

Post by DL1 »

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.
Post Reply

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

Register

Sign in

Return to “Interview Questions.”