IEF142I condition codes



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

IEF142I condition codes

Postby jsbeale » Fri Jan 07, 2011 4:37 am

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
jsbeale
 
Posts: 2
Joined: Fri Jan 07, 2011 4:24 am
Has thanked: 0 time
Been thanked: 0 time

Re: IEF142I condition codes

 

Re: IEF142I condition codes

Postby Robert Sample » Fri Jan 07, 2011 5:25 am

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.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 222 times

Re: IEF142I condition codes

Postby dick scherrer » Fri Jan 07, 2011 6:20 am

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. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: IEF142I condition codes

Postby jsbeale » Fri Jan 07, 2011 8:39 pm

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.
jsbeale
 
Posts: 2
Joined: Fri Jan 07, 2011 4:24 am
Has thanked: 0 time
Been thanked: 0 time

Re: IEF142I condition codes

Postby Robert Sample » Fri Jan 07, 2011 8:55 pm

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.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 222 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post