Page 1 of 2

MAXCC 2976

PostPosted: Thu Oct 18, 2012 11:56 am
by ankushgattani
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?

Re: MAXCC 2976

PostPosted: Thu Oct 18, 2012 12:01 pm
by BillyBoyo
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?

Re: MAXCC 2976

PostPosted: Thu Oct 18, 2012 12:10 pm
by ankushgattani
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.

Re: MAXCC 2976

PostPosted: Thu Oct 18, 2012 12:27 pm
by BillyBoyo
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.

Re: MAXCC 2976

PostPosted: Thu Oct 18, 2012 2:29 pm
by ankushgattani
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.

Re: MAXCC 2976

PostPosted: Thu Oct 18, 2012 2:45 pm
by ankushgattani
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!

Re: MAXCC 2976

PostPosted: Thu Oct 18, 2012 3:26 pm
by BillyBoyo
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.

Re: MAXCC 2976

PostPosted: Thu Oct 18, 2012 7:48 pm
by dick scherrer
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.

Re: MAXCC 2976

PostPosted: Thu Oct 18, 2012 10:49 pm
by ankushgattani
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.

Re: MAXCC 2976

PostPosted: Thu Oct 18, 2012 10:56 pm
by BillyBoyo
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?