What is the diff between Return code and Condition code?



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

What is the diff between Return code and Condition code?

Postby coollearner » Tue Jan 17, 2012 12:22 pm

I was askedn in one of the interviews "whats the difference between Return code and Condition Code"
Please let me know the meaning of these two terminologies and when they are applicable?
Knowledge is wealth
coollearner
 
Posts: 33
Joined: Thu Jun 03, 2010 3:15 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby steve-myers » Tue Jan 17, 2012 1:05 pm

Unfortunately, it's sort of a trick question. A "return code," in JCL, is a numeric code with a value from 0 to 4095 left by a program when it is called by JCL. Most languages have a mechanism to set this return code. The terms "condition code" and "return code" are often used interchangeably in JCL.

Technically, the only proper use of the term "condition code" is to refer to a two bit value set by most of the machine instructions, but this value is never used by JCL, unless a program explicitly retrieves a "condition code" and returns it as a return code. In Assembler this is moderately difficult, and essentially impossible in any other language. In 40+ years I've never encountered a program that does any such thing.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

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

Postby coollearner » Tue Jan 17, 2012 5:40 pm

Thanks
Knowledge is wealth
coollearner
 
Posts: 33
Joined: Thu Jun 03, 2010 3:15 pm
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post