MAXCC 2976



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

MAXCC 2976

Postby ankushgattani » Thu Oct 18, 2012 11:56 am

I have a program, which when executed is Causing the job to throw MAXXCC = 2976.
The program doesn't supply any return code to the job, so i thought it must be some system condition code.
I googled it, but didn't find anything.
I have to find out the reason for this MAXCC. Any ideas on how to approach this particular problem?
ankushgattani
 
Posts: 30
Joined: Wed Aug 29, 2012 12:20 pm
Has thanked: 3 times
Been thanked: 0 time

Re: MAXCC 2976

Postby BillyBoyo » Thu Oct 18, 2012 12:01 pm

We need more details. What is your program written in? Does it call any sub-programs? What, in general terms, is the program doing? Is there any use of subscripts/indexes?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: MAXCC 2976

Postby ankushgattani » Thu Oct 18, 2012 12:10 pm

Its a 13000 line COBOL code, a bit complex logic to produce some reports.
Yes, it calls sub-programs, some of which are Assembler codes.
Yes, it uses tables, subscripts/ indexes.

Actually not sticking to this particualr program, i wanted to ask about the approach i should follow to find out the reason for a MAXCC caused by a cobol programs.
ankushgattani
 
Posts: 30
Joined: Wed Aug 29, 2012 12:20 pm
Has thanked: 3 times
Been thanked: 0 time

Re: MAXCC 2976

Postby BillyBoyo » Thu Oct 18, 2012 12:27 pm

If there is no code in the Cobol program to set the RETURN-CODE, then there is the possibility that a CALLed program has set it.

There is also the possibility of some "stepping on storage" - which could be from subscripts/indexes going wild, or from the (erroneous) actions of a called program.

A batch program I assume. You can put code after each CALL to test for non-zero RETURN-CODE. That would tell you if and where a sub-program was setting (deliberately or otherwise).

See if you have compiler option SSRANGE. If you have, then you don't have wild subscripting. If you don't, try to recompile with it on and run the program.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: MAXCC 2976

Postby ankushgattani » Thu Oct 18, 2012 2:29 pm

I put a display after each sub-program call, none of them are displyed. So the sub-program calls are fine.
I've checked all the called sub-programs manually also, none of them is setting the RETURN-CODE.
I recompiled my program using SSRANGE compiler option, strangely the MAXCC got changed to 3040, google doesnt have anything on
MAXCC 3040.
ankushgattani
 
Posts: 30
Joined: Wed Aug 29, 2012 12:20 pm
Has thanked: 3 times
Been thanked: 0 time

Re: MAXCC 2976

Postby ankushgattani » Thu Oct 18, 2012 2:45 pm

With display statements for RETURN-CODE + SSRANGE compiler option, MAXCC = 3040
Only display statements for RETURN-CODE, MAXCC = 2768
SSRANGE compiler option, MAXCC = 3096

not sure whats happening with this code!
ankushgattani
 
Posts: 30
Joined: Wed Aug 29, 2012 12:20 pm
Has thanked: 3 times
Been thanked: 0 time

Re: MAXCC 2976

Postby BillyBoyo » Thu Oct 18, 2012 3:26 pm

You also DISPLAYed after the CALLs to any Assembler programs? With poor coding it is possible to leave a "side affect" from Assembler.

Assuming that you have done the DISPLAYs after the Assembler then I suspect you have a very "tricky" problem in that the "special register" RETURN-CODE is being overwritten (probably along with other stuff). As you make changes to the program, the overwriting starts in a different place, so different values are being overwritten in the RETURN-CODE.

Usually it is subscripts/indexes going "wild", but SSRANGE should have trapped any of those. Mostly otherwise it is a called sub-program doing it.

How big is your program? What sort of files/databases are being used? Is your program CALLed by another? How many OCCURS are there? Is indexing or subscripting used to reference OCCURS items?

Not being there myself, I think the best is for you to attempt to "isolate" the point in the program where the RETURN-CODE gets a value.

So,

IF RETURN-CODE NOT EQUAL TO ZERO
    DISPLAY "RETURN-CODE IS>" RETURN-CODE "<"
    DISPLAY "AT DISPLAY xxx"
END-IF


Where xxx you make unique for each IF.

Use a "binary chop" approach. Put a few of these (say four) at the "high level" control of your program. The first which produces a result will indicate the main part of the code where the problem occurs.

Then do the same for the next highest level in that part of the code.

Keep "narrowing it down" until you get to the particular line.

Let us know, it is interesting.

You won't find anything on google for those values, as they are not being set by anything specific to anything specific.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: MAXCC 2976

Postby dick scherrer » Thu Oct 18, 2012 7:48 pm

Hello,

MAXCC is mentioned as the "culprit". Then there is much about "return-code". These are NOT the same. . .

What showed you there is a value in MAXCC?

Suggest you post the informational/diagnostic info that indicated there is a problem.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: MAXCC 2976

Postby ankushgattani » Thu Oct 18, 2012 10:49 pm

Hi,

The job completes with MAXCC = 2976. I got this value from spool
There are no informational/diagnostic info that indicated there is a problem, because there is no problem actually. the job completes successfully.
Its just that the output of the job are some reports, which are having incorrect data.
Wanted to make sure if it has something to do with MAXCC 2976, because this program has never thrown this Return-Code before.
ankushgattani
 
Posts: 30
Joined: Wed Aug 29, 2012 12:20 pm
Has thanked: 3 times
Been thanked: 0 time

Re: MAXCC 2976

Postby BillyBoyo » Thu Oct 18, 2012 10:56 pm

Don't kid yourself that there is no problem. They (problems which aren't obvious initially) can be the worst, as you get several days (or worse) of data-integrity problems instead of a failure you pick up to get it going again.

Did you get anywhere with my suggestion?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Next

Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post