Menu

rm/cobol compile errors

2023-02-14
2024-01-22
1 2 3 .. 5 > >> (Page 1 of 5)
  • julius turner

    julius turner - 2023-02-14

    I am trying to convert a RMcobol to Gnucobol the compile gave me the following errors

     
  • julius turner

    julius turner - 2023-02-14

    Compile and program

     
  • Brian Tiffin

    Brian Tiffin - 2023-02-14

    Can't tell much from that Julius. Try to cut and paste some of the text, or attach redacted code listings, as source, not image.

    Unless you are getting the message from seq number 002500? There is a stray date after the period it looks like.

    Cheers,
    Blue

     

    Last edit: Brian Tiffin 2023-02-14
  • julius turner

    julius turner - 2023-02-14

    thanks !that line is commented out

     
    • Brian Tiffin

      Brian Tiffin - 2023-02-14

      :-)

      Still have no idea what your error message is though, and the image doesn't really cut it for local trials. So, unless I'm missing something obvious in the image (a distinct possibility) we'll need more info to help.

      Cheers,
      Blue

       
  • julius turner

    julius turner - 2023-02-14

    I'm sorry Blue I thought I had all the details available for debugging
    I will redo the situation Thanks again !

     
    • Brian Tiffin

      Brian Tiffin - 2023-02-14

      Try and capture the message from the console, paste it here, and a chunk of source code we can maybe try out. If there is proprietary code, then we'd want what StackOverflow calls a Minimal Reproducible Verifiable Example or something close enough to not make for too much work on behalf of the helpers.

      And we do not mind ping pong back and forth messaging to work through problems here.

      Have good,
      Blue

       
  • Anonymous

    Anonymous - 2023-02-15

    Cmd Compile - I have a copy of the compiler output I hope that will help

     

    Last edit: Simon Sobisch 2023-02-19
    • Simon Sobisch

      Simon Sobisch - 2023-02-19

      Please do not post screenshots of compile commands or output - you can just mark it with the mouse, then right-click and have it in the clipboard - and then post that.

      Text can be read via RSS and mail subscription, and can also be searched for later. Images of code and text output only lead to access barriers...

       
  • Mickey White

    Mickey White - 2023-02-15

    Julius, it would help to see the complete listing of the copybooks ZZWSRTDF.CPY and ZZKEYSSF.CPY

     
  • julius turner

    julius turner - 2023-02-15

    Thanks, I will try to get it to you as soon as possible.

     
  • julius turner

    julius turner - 2023-02-16

    Hello! Here are the two copybooks.

     
    • Simon Sobisch

      Simon Sobisch - 2023-02-19

      Your original error message has

      ... is not the original definition

      on the REDEFINE.

      As you want the (non-standard) rm-cobol syntax you need to enable that; normally -std=rm-strict should be enough, but as this config was not setup correctly you'd need to either adjust it before use (file config/rm-strict.conf; will be changed in the release version next week) or override it with -findirect-redefines.

      ... and as you want to compile RM/COBOL and also have their different screen use you definitely should compile with -std=rm-strict. It is possible that everything works after doing that...

       
  • Mickey White

    Mickey White - 2023-02-16

    Julius,
    I do see in copybook zzwsrtdf that RD-WT-H44C has an entry without a PIC. Physical line 2102 in the copybook.
    I do not know much about Screens and LINE and COLUMN, but I put the zzkeyssf copybook after the screen section. line and got no errors. ?
    Perhaps that is a start....

     

    Last edit: Mickey White 2023-02-16
  • julius turner

    julius turner - 2023-02-17

    Thanks so much. I will give it a try.
    I looked at that line and more to the right there is the PIC clause this is a valid entry.
    I will take a look at the next cpy tomorrow. Thanks

     
    • Mickey White

      Mickey White - 2023-02-17

      Correction. My FTP of the copybooks had issue. I copied them back over and compiled and all worked with no errors (with putting the screen section line in before the zzkeyssf copybook).
      cobc -x testpgm.cbl -std=rm
      No errors

       
  • Mickey White

    Mickey White - 2023-02-18

    FYI it worked on my Windows 10 with no errors. version 3.2-rc2.0 using pdcurses
    And worked on my linux box version 3.2-rc2.0 using ncursesw

     
  • julius turner

    julius turner - 2023-02-19

    Thanks Mickey I am trying to re-construct what you have done on my pc. I will try to be more
    timely responsive to your effort for me.

     
  • julius turner

    julius turner - 2023-02-19

    Mickey I am using win 11 and the program that exe this copy book has the copy book coming after
    the screen section which created the original errors listed above.
    could you instruct me step by step so I will be on the same page as you?

     
    • Simon Sobisch

      Simon Sobisch - 2023-02-19

      Step by step:

      • ensure that zzkeyssf is in SCREEN SECTION
      • compile with cobc -std=rm-strict -findirect-redefines -x jctprwwp.cbl


      If you want to add new features, then go with -std=rm instead, but that means that you may need to -fno-reserved=some,conflicting,words or rename user-defined words if you get "unexpected WORD" somewhere.

       
    • Mickey White

      Mickey White - 2023-02-19

      What version of GnuCOBOL do you have? I used Arnold's 7zip exe . 64 bit.

      C:\GnuCOBOL-3.1.2.0>set_env.cmd
      
      cobc (GnuCOBOL) 3.2-rc2.0
      Copyright (C) 2023 Free Software Foundation, Inc.
      License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
      This is free software; see the source for copying conditions.  There is NO
      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
      Written by Keisuke Nishida, Roger While, Ron Norman, Simon Sobisch, Edward Hart
      Built     Feb 11 2023 00:45:32
      Packaged  Feb 11 2023 01:47:30 UTC
      C version (MinGW) "12.2.0"
      
      GnuCOBOL 3.2.0 (Feb 11 2023 00:44:22), (MinGW) "12.2.0"
      GMP 6.2.1, libxml2 2.10.3, cJSON 1.7.15, PDCursesMod 4.3.5, BDB 18.1.40
      
      C:\GnuCOBOL-3.1.2.0>cobc -v
      cobc (GnuCOBOL) 3.2-rc2.0
      Built     Feb 11 2023 00:45:32  Packaged  Feb 11 2023 01:47:30 UTC
      C version (MinGW) "12.2.0"
      loading standard configuration file 'default.conf'
      cobc: error: no input files
      
      C:\GnuCOBOL-3.1.2.0>
      

      Here is my test program:

             identification division.
             program-id.             shellx.
             environment division.
             configuration section.
             source-computer.
                 System76
            *           with debugging mode
                 .
             repository.
                 function all intrinsic.
             input-output section.
             file-control.
             data division.
             file section.
             working-storage section.
             01 struct.
                05 field pic s9(10)v99.
             01 other-struct.
                02 other-field pic x(15).
                  copy zzwsrtdf.
             screen section.
                 copy zzkeyssf.
             procedure division.
                 move 1230 to field
                 display " field = " field
                 end-display
            *    move field to other-field of other-struct
                 display " other-field = " other-field
                 end-display
                 goback
                 .
      

      My compile: cobc -x shellx.cbl -std=rm

      What is your setup?

       

      Last edit: Simon Sobisch 2023-02-25
  • julius turner

    julius turner - 2023-02-19

    Simon

    Your original error message has
    ... is not the original definition

    on the REDEFINE.

    As you want the (non-standard) rm-cobol syntax you need to enable that; normally -std=rm-strict should be enough, but as this config was not setup correctly you'd need to either adjust it before use (file config/rm-strict.conf; will be changed in the release version next week) or override it with -findirect-redefines.

    ... and as you want to compile RM/COBOL and also have their different screen use you definitely should compile with -std=rm-strict. It is possible that everything works after doing that...
    Thanks Simon I'm still trying
    How would the compile look I now use cobc -x prog to do the fix above.

     
  • julius turner

    julius turner - 2023-02-21

    test

     
  • julius turner

    julius turner - 2023-02-21

    stay with me everyone I have bitten off more than I can chew at the moment
    so I am going to take a step back and refocus then try again.

     
  • julius turner

    julius turner - 2023-02-21

    Simon thanks about the Clipboard tip.

     
1 2 3 .. 5 > >> (Page 1 of 5)

Anonymous
Anonymous

Add attachments
Cancel