Page 1 of 1

Differece between MAXCC=8 and MAXCC=12

PostPosted: Mon May 23, 2011 3:25 pm
by coollearner
When does the compiler give MAXCC 8 and when does it give MAXCC 12?
Please give me the difference between MAXCC= 8 or 12 or 16

Re: Differece between MAXCC=8 and MAXCC=12

PostPosted: Mon May 23, 2011 4:00 pm
by BillyBoyo
"The compiler" (I don't know what language you mean, so I'll talk about Cobol) gives return-codes dependent on the "severity" of the syntax errors in your program. If you have no error messages at all, you get zero. If you have "warnings" you get 4, "cautions" you get 8, "errors" you get 12, "severe errors" you get 16.

Basically, your program will not work if you get 12 or 16. You probably won't even get the code generated. With 8, you might be OK, but you have to check all the messages. Some "cautions" will really be errors for you which you need to correct. With "warnings" your program will run, but always worth checking those as well.

Re: Differece between MAXCC=8 and MAXCC=12

PostPosted: Mon May 23, 2011 4:27 pm
by Robert Sample
When does the compiler give MAXCC 8 and when does it give MAXCC 12?
Please give me the difference between MAXCC= 8 or 12 or 16
Terminology is critical in IT, where similar terms may mean very different things. The ONLY time MAXCC is applicable is when you are running IDCAMS and refer to the condition code set by one of its commands. It is NOT appropriate to refer to MAXCC if you are not talking about IDCAMS. In z/OS, batch job steps have return codes -- not MAXCC -- that are set to different values from 0 to 4095 depending upon the program.

Hence, your very question makes no sense. Compilers are not IDCAMS and hence you cannot refer to MAXCC for them, period. Please learn the difference between MAXCC and return code and use the correct and appropriate terminology. In general, compilers will set a return code of 4 when there are warnings -- in other words, the compiler is interpreting something in the code in a particular way and is warning you to check it. Return code 8 means there are errors in your code that need to be corrected. The compiler may have attempted a fix, but that fix may not be apprpriate. Return code 12 is generally a severe error and the compile failed. Return code 16 is usually reserved for catastrophic compiler problems -- such as not defining the correct DD statements, so the compiler cannot continue and may not be able to print messages as to why not.

Re: Differece between MAXCC=8 and MAXCC=12

PostPosted: Mon May 23, 2011 4:35 pm
by coollearner
So you mean that if return code is 8, program is compiled and can be run?

Re: Differece between MAXCC=8 and MAXCC=12

PostPosted: Mon May 23, 2011 4:53 pm
by enrico-sorichetti
would it be so difficult to try to find out by Yourself
starting from ( for example ) here
http://publibz.boulder.ibm.com/cgi-bin/ ... s/IGY3SH40
proceeding to
http://publibz.boulder.ibm.com/cgi-bin/ ... 1214180654
and to
http://publibz.boulder.ibm.com/cgi-bin/ ... 1214180654
and to
http://publibz.boulder.ibm.com/cgi-bin/ ... 1214180654
to arrive happily here
http://publibz.boulder.ibm.com/cgi-bin/ ... 0654&CASE=
where You can read all You might want to know about COBOL compiler return codes

Re: Differece between MAXCC=8 and MAXCC=12

PostPosted: Mon May 23, 2011 6:09 pm
by BillyBoyo
The return-code is a very brutal measure of whether your program is worth running. If you don't get zero, always check the messages. You site will have set up JCL procedures for compiling and linking. Even if your program linked successfully, doesn't mean it is worth running. Check the messages, no other way to know.

Re: Differece between MAXCC=8 and MAXCC=12

PostPosted: Mon May 23, 2011 7:07 pm
by Robert Sample
So you mean that if return code is 8, program is compiled and can be run?
Nope, none of us have said that. A return code 8 almost always means the executable load module was not created and therefore there's nothing to run. Whether or not a load module was created (and that depends upon the standards set at YOUR site, which are different for every site), there's very little chance that a return code 8 for a compile will produce a load module that could produce results.

Re: Differece between MAXCC=8 and MAXCC=12

PostPosted: Tue May 24, 2011 12:12 pm
by steve-myers
The trouble with return codes from a program such as a compiler or the Binder is it is fairly subjective based on the opinion of the authors of the program. A compiler or Binder return code grster than 8 often means the program ran into some sort of problem that prevented the program from functioning.

Any return code greater than 0 means you should check the output to analyze the problem; it is not worth the effort to fixate on the actual value of the return code. Some products place notes about Binder errors that can be ignored in their Binder control statements, but you are not likely to encounter any of this.