Page 1 of 3

COBOL 5.1 Compilation Error: ./CodeGenerator.cpp:4665

PostPosted: Wed May 18, 2016 9:24 pm
by Aki88
Hello,

My apologies for this very trivial query, but it has me stumped.

I haven't had a chance to play around with a machine that is running 5.1/5.2 versions; and then suddenly all prayers answered - a box with z/OS 2.1/COBOL- 5.1 and another box with z/OS 2.2/COBOL- 5.2; a colleague testing the COBOL 5.1 rig asked me a simple query pertaining to a compilation error for a program which is compiling clean on 4.2, but going for a toss on 5.1 (which is understandable going by the amount of changes that have gone into the new releases).

The error:


4665  IGYCB7104-U   Internal error while compiling function XYXYXY. Failed assertion on ./CodeGenerator.cpp:4665. Compilation
                      terminated.
 


I tried searching for: './CodeGenerator.cpp:4665' on the web, but couldn't find something relevant (or in case if there was something, I could't make much sense of it); also searched for IGYCB7104, afa I could make out from the search results, I should be looking at the compiler options; but which one - am still unsure.
It'd be really kind if someone can please point my nose in the correct direction for the documentation where I can find some details on the above messages (I hope these are documented somewhere unlike the traditional IGY* messages which are deemed self-explanatory).

P.S.: Even the simple 'ERRMSG' program returned an RC-16 (tested on 5.2) in the phase: IGYCDIAG :shock: (had expected it to run clean, unless there is a conflicting compiler option which is messing things up for me; am currently revisiting the application programming guide/migration guide, to see if something can be salvaged out of it)

Thank you.

Re: COBOL 5.1 Compilation Error: ./CodeGenerator.cpp:4665

PostPosted: Wed May 18, 2016 9:35 pm
by Aki88
<Exceeded the post edit time>
The ERRMSG compilation failed with: IGYDI5006-U; end-of-file while reading from SYSUT3.

Re: COBOL 5.1 Compilation Error: ./CodeGenerator.cpp:4665

PostPosted: Wed May 18, 2016 9:39 pm
by BillyBoyo
It's an internal compiler error. You need to look at the Fix List, and get the Sysprogs to apply anything that looks like it does for the message, or report it to IBM as a new error.

Looking at the list, http://www-01.ibm.com/support/docview.w ... 164#310316, I see that March 2016 is up. Searching there for your message lists a fix from May 2015. If you have one year-old fix which is not applied, you may have others.

Can you show the ERRMSG program you tried? Does it end with a full-stop/period?

I suspect some search-engineing would have found the item.

I suspect, but don't know,

Re: COBOL 5.1 Compilation Error: ./CodeGenerator.cpp:4665

PostPosted: Wed May 18, 2016 9:41 pm
by BillyBoyo
Ah. I saw your last whilst posting mine. Yes, I'd diagnose that as the program not ending with a full-stop/period, which the compiler is searching for. Causes an abend prior to V5.

Re: COBOL 5.1 Compilation Error: ./CodeGenerator.cpp:4665

PostPosted: Wed May 18, 2016 9:47 pm
by Aki88
Thank you Billy; I revisited the ERRMSG program, it did have the period.

Nevertheless, I went back to the programming guide and copy pasted the ERRMSG code snippet (having doubted my typing abilities); but the end result remains the same - an IGYDI5006 message.

Best regards.

Re: COBOL 5.1 Compilation Error: ./CodeGenerator.cpp:4665

PostPosted: Wed May 18, 2016 9:49 pm
by enrico-sorichetti
looks like the compiler is written in c++ :shock:

and if You had searched just with "cobol CodeGenerator.cpp"

You would have landed here
http://www-01.ibm.com/support/docview.w ... wg27041164

Re: COBOL 5.1 Compilation Error: ./CodeGenerator.cpp:4665

PostPosted: Wed May 18, 2016 9:52 pm
by prino
enrico-sorichetti wrote:looks like the compiler is written in c++ :shock:

The PL/I front-end is written in PL/I, but nowadays all compilers use the same pretty hopeless back-end written in C++, which may generate good code, but which sadly is no longer readable in the assembler listing generated.

Re: COBOL 5.1 Compilation Error: ./CodeGenerator.cpp:4665

PostPosted: Wed May 18, 2016 9:53 pm
by Aki88
Hello Enrico,

enrico-sorichetti wrote:looks like the compiler is written in c++ :shock:


I actually did check the fix list as well, but didn't seem to find 4665; or maybe I need a new pair of spectacles :(

Re: COBOL 5.1 Compilation Error: ./CodeGenerator.cpp:4665

PostPosted: Wed May 18, 2016 10:00 pm
by enrico-sorichetti
first from the
Failed assertion


here is the man page for the c/c++ assert builtin

ASSERT(3) BSD Library Functions Manual ASSERT(3)

NAME
assert -- expression verification macro

SYNOPSIS
#include <assert.h>

assert(expression);

DESCRIPTION
The assert() macro tests the given expression and if it is false, the
calling process is terminated. A diagnostic message is written to stderr
and the abort(3) function is called, effectively terminating the program.

If expression is true, the assert() macro does nothing.

The assert() macro may be removed at compile time with the cc(1) option
-DNDEBUG.

DIAGNOSTICS
The following diagnostic message is written to stderr if expression is
false:

"assertion \"%s\" failed: file \"%s\", line %d\n", \
"expression", __FILE__, __LINE__);

SEE ALSO
cc(1), abort(3)

STANDARDS
The assert() macro conforms to ANSI X3.159-1989 (``ANSI C89'').

HISTORY
A assert macro appeared in Version 6 AT&T UNIX.

BSD June 9, 1993 BSD


it' s usually a quick way out of something that really should not ever occur

Re: COBOL 5.1 Compilation Error: ./CodeGenerator.cpp:4665

PostPosted: Wed May 18, 2016 10:11 pm
by BillyBoyo
Yes, you'll need to check whether the item in that fix could relate to your program. Although the compiler line-number is different, it is the only thing which is different, and that message itself is different from the other examples. I may have made too much of that :-)

If that isn't your issue, then you need to report it to IBM (probably not you directly, but one of the techies will know how).

Curious about the ERRMSG program. Can you past exactly what you tried?