Menu

Reserved Word - error: 'exhibit' is not a statement

2021-03-09
2021-03-09
  • Keith Pennington

    I'm seeing a lot of these messages as I'm compiling COBOL from our old system that used Microfocus COBL.
    xxxx.cob:2390: error: 'exhibit' is a reserved word, but isn't supported
    xxxx.cob:2390: error: 'named' is a reserved word, but isn't supported
    xxxx.cob:2390: error: 'exhibit' is not a statement

    I did find this IBM recommendation as a work-around but I've seen statements that this method does not contain all the information the exhibit statement output did.
    https://www.ibm.com/support/knowledgecenter/SS6SG3_6.2.0/migrate/igymch1025.html

    The 'exhibit' statement appears to still be supported in Microfocus and IBM (not Enterprise) COBOL. Are there any plans to incorporate this into GnuCOBOL?

     
    • Simon Sobisch

      Simon Sobisch - 2021-03-09

      It is in. Do you use a current GnuCOBOL version? What is your command line?

       
  • Keith Pennington

    I'm getting an answer from my COBOL programmers. I'm the systems guy trying to get things started and running mass compiles for them.

    We are using:
    cobc (GnuCOBOL) 3.1-rc1.0

    I thought I had already downloaded a Programmer's Guide. I just got the GnuCOBOL 3.1 (dev) Programmers Guide (US Letter).pdf and I see 'exhibit' in there. I suspect there's a formatting difference.

    I'll forward the manual to them for review.

     
    • Simon Sobisch

      Simon Sobisch - 2021-03-09

      Because of bugs found and of some missing bits I highly suggest you update to GnuCOBOL 3.1.2. The nice thing: it is possible to mix 3.1-rc1 generated modules with 3.1.2 generated ones (as long as you use a 3.1.2 runtime).
      Update to the stable release 3.1.2 and EXHIBIT will work [CHANGED clause is ignored] (and also the debugging part works much better, if you ever want to debug the COBOL modules...).

       
  • Keith Pennington

    Thanks, Simon. I've downloaded the latest update and I'll look for the documentation on upgrading. Is is as simple as running the installation process for this version and letting it write over the previous version?

     
    • Simon Sobisch

      Simon Sobisch - 2021-03-09

      Yes and in this case it likely does not leave any old files around either (if you want to really have a clean uninstall: configure and make the new environment, then run sudo make uninstall in the old build folder (or configure then make uninstall the old version with the old options again if you don't have the old install any more), then run sudo make install from the new folder (but in your case I'd just make install over the old version.

      The only thing you really want to check before installing is that you did not changed the installed files afterwards. It is unlikely that this was done, but double-checking the dates and/or backup $installdir/share/gnucobol won't harm (the copybooks are rarely adjusted post-install, config/runtime.cfg is possibly most often adjusted, sometimes people adjusted other files under config, too).

       
  • Keith Pennington

    Thank you, Simon. That seems to have done the trick. After finishing the 3.1.2 install, I compiled the first program that had the "exhibit" error and it compiles cleanly now.

     
    • Simon Sobisch

      Simon Sobisch - 2021-03-09

      Yes and it actually works :-)

       

Anonymous
Anonymous

Add attachments
Cancel