Page 1 of 1

IEF142I condition codes

PostPosted: Fri Jan 07, 2011 4:37 am
by jsbeale
We have recently expanded some copybooks and updated programs. During testing all the results are equal between the 'old' data and 'new' data. Our concern is the condition code difference with IEF142I.
Old code results:
IEF142I @@P01692 P692OLD - STEP WAS EXECUTED - COND CODE 2472

New coderesults:
IEF142I @@P01692 P692NEW1 - STEP WAS EXECUTED - COND CODE 0736

Is there a list of possible condition codes that I can look at so we can move forward with our testing?

Thank you,
Jody

Re: IEF142I condition codes

PostPosted: Fri Jan 07, 2011 5:25 am
by Robert Sample
COBOL programs use RETURN-CODE special register to set whatever return code they want. Why are you asking us when the only answer will be found in the source code of the program?

If your program doesn't set RETURN-CODE, then the return code is probably whatever (semi-random) value is in register 15 when the program ends.

Re: IEF142I condition codes

PostPosted: Fri Jan 07, 2011 6:20 am
by dick scherrer
Hello and welcome to the forum,

Rather than trying to determine the cause of various return codes, suggest you review the code and make sure that the return-code is properly set before exiting the program. Unpredictable return code values are just a sign of sloppy code implementation previously.

Unless, of course, there are statements in the code that intentionally set these return code values for whatever reasons. . .

Re: IEF142I condition codes

PostPosted: Fri Jan 07, 2011 8:39 pm
by jsbeale
Thank you both for your replies. I was asked to research the differences in the condition codes. I did realize register 15 contained the answer, yet I was not having any luck finding where the return codes were set. I thought maybe there was actually a list of preset return codes that I was not familiar with that could explain.

Re: IEF142I condition codes

PostPosted: Fri Jan 07, 2011 8:55 pm
by Robert Sample
I thought maybe there was actually a list of preset return codes that I was not familiar with that could explain.
For system utiltiies, vendor programs, and such products as FTP, there are standard return codes that mean different things. However, for an application program the return code can be any value from 0 to 4095 and the specific meaning of each value is determined entirely and solely by the program. There are no standard return codes for applications, and therefore there is no list of them.