Menu

Realia - installing GnuCobol to work with Realia programs and files

Anonymous
4 days ago
6 hours ago
  • Anonymous

    Anonymous - 4 days ago

    I downloaded Trembley's preconfigured version - GnuCOBOL 3.2 VBI
    (13Aug2023) GC32-VBI-SP1-rename-7z-to-exe.7z -- MinGW GnuCOBOL compiler for
    Windows XP/7/8/10/11. Includes GCC 9.2.0, VBISAM 2.1.1 for Indexed
    Sequential file access support, GMP 6.2.1, and PDCursesMod 4.3.7 (24.3
    megabytes).

    I tried to compile and got an error because a Realia reserved word was not
    recognized - "Field-Terminator". It shows what key was used: F1, Escape,
    Enter, etc. I think I have to install the compiler manually with a config
    option for Realia, not sure if there is a way to tell the compiler it's a
    Realia program without doing it when configuring the compiler. What do I
    need to do?

    Second issue - a simple program that copies an isam file gets return code
    35 on open of input file - file not found. I put the file in the same
    folder as the exe file created by the compile, I changed the definition of
    the file in the select statement to have the complete path as the
    file-name:

    SELECT GAME-FILE ASSIGN TO "C:\BBSTATS\BBSTAT.NEW"

    ORGANIZATION IS INDEXED

    ACCESS MODE IS SEQUENTIAL

    RECORD KEY IS G-KEY

    STATUS IS GAME-STATUS.

    Any ideas?

    Thanks in advance.

    Steve MacKinney

     
    • Ralph Linkletter

      With regard to the first issue - I think you must convert the Realia special keys to their equivalent function in GnuCOBOL

      On the second issue.
      If the file is an ISAM file from Realia - it is not compatible with GnuCOBOL.
      You could use Realia to read the ISAM file sequentially - write an output record sequential file.
      Feed that output file into a GnuCOBOL program as input - writing a GnuCOBOL ISAM file as output.

       
      • Anonymous

        Anonymous - 3 days ago

        Thanks, Ralph. I did replace the Field-Terminator with a new field and used the Special Names feature to use CRT Status, then I eliminated all references to BEEP. Now when I compile, I get:
        **C:\Program Files (x86)\OpenCobolIDE\GnuCOBOL\bin\cobc.exe -x -o bin\BBSTAT.exe -std=ibm BBSTAT.COB

        **unknown (signal)

        **cobc: aborting compile of BBSTAT.COB at line 1655 (PROGRAM-ID: BBSTAT)
        cobc: Please report this!

        I tried to compile using every version of cobol that is supported, same results.
        I did more research and found that version 4 of GnuCobol will support Realia so I'm pausing my attempts to make it work on version 3. If anyone knows how I can volunteer to help test version 4 or provide programs and files for them to use in testing, let me know.

        Also, if anyone has info on what parts of Realia can be changed to a different version of cobol that Gnu does support, I would modify my program to be compatible - all 17,000 lines of it.

        And in conclusion, will ISAM files be available for multiple simultaneous users in version 4?

         
        • Simon Sobisch

          Simon Sobisch - 3 days ago

          Please provide the program and copybooks (ideally reducing it before - we'd like to inspect and fix that abort!)

          Also: if possible we'd start -std=realia - for that note down which errors happen and categorize them (the field-terminator would possibly be too much effort because of different return values, but syntax stuff and some extensions are relative easy to add in cobc itself).

           
          • Steve MacKinney

            Steve MacKinney - 3 days ago

            Thank you, Simon! I zipped all the source and it is attached. The version I'm sending has the changes made to it to get around the Field-Terminator not defined and has BEEP removed from Display statements.
            I added -std=realia to the compiler options and changed the "standard" in OpenCobolIDE to "none" and retired the compile. Got the same abend as described above.
            Is version 4 available for download yet for testing?

             
            • Ralph Linkletter

              This expression has unbalanced parentheses (at or about 1655)
              IF ((WS-WHO-HAS-BALL = "T"
              AND AT-2ND-OFFENSE-DEFENSE (ACT) NOT = "D")
              OR (WS-WHO-HAS-BALL = "U"
              AND AT-2ND-OFFENSE-DEFENSE (ACT) = "D")
              MOVE "T" TO US-OR-THEM
              ELSE

               
              👍
              2
              • Steve MacKinney

                Steve MacKinney - 2 days ago

                Thanks, Ralph. There was also a line or two missing right before this statement. Fixed it and it not compiles without the abend, but it did find some more errors which I will fix tomorrow and try again.

                 
            • Simon Sobisch

              Simon Sobisch - 12 hours ago

              The good thing: The abend during compile with the invalid expressions doesn't happen with GC3.3 dev any more, leading to:

              BBSTAT.COB: in paragraph 'FIND-2ND-US-OR-THEM':
              BBSTAT.COB:1651: error: invalid expression: unfinished expression
               1649 |            MOVE AT-2ND-OFFENSE-DEFENSE (ACT) TO US-OR-THEM.
               1650 |            IF US-OR-THEM NOT = "U" AND NOT = "T"
               1651 >            IF ((WS-WHO-HAS-BALL = "T"
               1652 |                   AND AT-2ND-OFFENSE-DEFENSE (ACT) NOT = "D")
               1653 |                 OR (WS-WHO-HAS-BALL = "U"
              BBSTAT.COB: in paragraph 'DRPP-DELETE-LINE':
              BBSTAT.COB:5247: error: syntax error, unexpected DISPLAY
               5245 |            MOVE " " TO SAVE-PREV-END-POSS.
               5246 |             DISPLAY WS-LINE LINE 1 COLUMN 1  DISPLAY NTS-LINE LINE 1 COLU..
               5247 >              DISPLAY "DRPP-DELETE-LINE" LINE 1 COLUMN 17
               5248 |             ACCEPT WS-KEY LINE 1 COLUMN 78
               5249 |       *  DEBUG
              BBSTAT.COB: in paragraph 'TGS-TOS-SHOW-TURNOVER-COST':
              BBSTAT.COB:9921: error: syntax error, unexpected ., expecting ) or - or +
               9919 |                PERFORM TGS-TOS-SCREEN-FULL.
               9920 |            COMPUTE WS52 = TOS-POINTS (T)
               9921 >                 / (TOS-POSS (T) - TOS-T-O (T).
               9922 |            DISPLAY
               9923 |            "Average points per possession when no Turn Over:"
              BBSTAT.COB: in paragraph 'AIOS-ADD-VALUES':
              BBSTAT.COB:10764: error: invalid expression: unfinished expression
              10762 |                IF WHICH-HALF = 1
              10763 |                    ADD 1 TO IDS-FIRST-HALF-FOULS (T).
              10764 >            IF WPE-ACTION (W) = "TF"
              10765 |            AND ((WPE-WHO (W) = "U " AND T LESS 21)
              10766 |                OR (WPE-WHO (W) = "T" AND T NOT LESS 21)
              BBSTAT.COB: in paragraph 'AIDS-ADD-VALUES':
              BBSTAT.COB:11440: error: invalid expression: unfinished expression
              11438 |                    ADD 1 TO IDS-FIRST-HALF-FOULS (T).
              11439 | 
              11440 >            IF WPE-ACTION (W) = "TF"
              11441 |            AND ((WPE-WHO (W) = "U " AND T LESS 21)
              11442 |                OR (WPE-WHO (W) = "T" AND T NOT LESS 21)
              BBSTAT.COB: in paragraph 'SS-AS-DONE':
              BBSTAT.COB:13608: error: 'SS-AS-EXIT' is not defined
              13606 |            PERFORM AIDS-TOTALS-END.
              13607 |            MOVE "N" TO DO-EDIT-ENTRY
              13608 >        SS-AS-EXIT.
              13609 |            EXIT.
              13610 | 
              BBSTHELP.COB: in paragraph 'DO-HELP-ACCEPT':
              BBSTHELP.COB:54: error: 'FIELD-TERMINATOR' is not defined
                 52 |            ACCEPT WS-KEY AT LINE 21 COLUMN 74.
                 53 |            DISPLAY BLANK-69 AT LINE 21 COLUMN 6.
                 54 >            IF FIELD-TERMINATOR = RK-ESC
                 55 |                GO TO DO-HELP-END.
                 56 |            IF FIELD-TERMINATOR = RK-PAGE-DOWN
              

              Do these "broken programs" compile on Realia?!?

              In any case, you can allow BEEP with -std=ibm -freserved=BEEP:BELL, but as noted before that will leave you with the issue of FIELD-TERMINATOR and different key values.

              To solve this you can either try to adjust the programs or, for example make a replacement version of your copybook REALKEYS.COB (note: I'd highly suggest to use .CPY or similar for those) using text-manipulation by something like

                     COPY screenio.
                     REPLACE FIELD-TERMINATOR BY COB-CRT-KEY.
                     REPLACE BEEP BY BELL.
                     REPLACE RK-F1 BY COB-SCR-F1.
                    *> and so on for all other names...
              

              For both 3.x and 4.x development snapshots, see the nightly builds under Downloads.

               
              • Steve MacKinney

                Steve MacKinney - 8 hours ago

                Thank you! I will take your advice and drop back to 3.2, also will drop back to my last production version of my BBSTAT code. Sorry about sending you the new version that was unfinished. Love your suggestions on getting around the BEEP and Field-Terminator issues and I think I will just modify the code to be compatible with GnuCobol rather than doing the Replace options.
                My OCIDE quit allowing the compile option, even after reinstalling it and reinstalling GnuCobol (from Trembley's site) so that is my next obstacle.
                Thanks again! I'm impressed with the quality of support, especially when it is for a free product.

                 
                • Simon Sobisch

                  Simon Sobisch - 7 hours ago

                  As noted before: OCIDE is totally unmaintained and known to have different issues, it may not work as soon as something is updated on your system...
                  If you are not very attached to it, consider using vscode [I'm using the VSCodium build and would suggest using that to not get the MS and AI bloat by default] with the superbol extension (for Windows, you may also consider using the Windows GnuCOBOL installer they provide) - a bit of setup, but that's a one-time issue, and it seems taht OCIDE will take time as well.

                  In the past I've also used Notepad++ and setup compilation + diagnostic references into the code (worked well, but vscode works better for me overall).

                   
                  • Marco Antoniotti

                    Marco Antoniotti - 6 hours ago

                    ... or, again, you could use Emacs with cobol-mode, and, for the more
                    adventurous, check my IRON-MAIN https://github.com/marcoxa/iron-main (
                    https://github.com/marcoxa/iron-main) package.

                    You can even get properly highlighted JCL and COBOL in the same buffer with
                    automatic switching of commands available. I am sure the VsCode crowd have
                    done stuff similarly. But it ain't Emacs.

                    Cheers

                    Marco

                    On Sun, Oct 5, 2025 at 9:16 PM Simon Sobisch sf-mensch@users.sourceforge.net wrote:

                    As noted before: OCIDE is totally unmaintained and known to have different
                    issues, it may not work as soon as something is updated on your system...
                    If you are not very attached to it, consider using vscode [I'm using the
                    VSCodium build and would suggest using that to not get the MS and AI bloat
                    by default]
                    with the superbol extension (for Windows, you may also
                    consider using the Windows GnuCOBOL installer they provide) - a bit of
                    setup, but that's a one-time issue, and it seems taht OCIDE will take time
                    as well.

                    In the past I've also used Notepad++ and setup compilation + diagnostic
                    references into the code (worked well, but vscode works better for me
                    overall).


                    Realia - installing GnuCobol to work with Realia programs and files
                    https://sourceforge.net/p/gnucobol/discussion/help/thread/ee68ff8dcf/?limit=50#6ba7/d813/98d3/66d5/9703/07e9/e471/d7a6


                    Sent from sourceforge.net because you indicated interest in
                    https://sourceforge.net/p/gnucobol/discussion/help/

                    To unsubscribe from further messages, please visit
                    https://sourceforge.net/auth/subscriptions/

                    --
                    Marco Antoniotti

                     
          • Steve MacKinney

            Steve MacKinney - 2 days ago

            It now does not abend on the compile after I corrected what Ralph found. I will fix some errors the most recent compile exposed and keep working on it, but the compile does not abend now.

             
            • Steve MacKinney

              I realized that the version of the program I sent to you was unfinished. I had started an enhancement project 30 years ago and quit when I got involved in other projects. Then realia cobol stopped working on newer windows releases and I put it aside until a few years ago. I got a new version of dosbox that runs on 64 bit windows and my program runs ok with it (an older version of my stats program). I still want to migrate to gnucobol once release 4 is ready but I'm going to focus on using the dosbox solution until then. Thanks again for your help and let me know if I can do any testing for you on gnucobol version 4.

               
              • Simon Sobisch

                Simon Sobisch - 12 hours ago

                Why waiting for 4.x when GnuCOBOL 3.2 is in production world-wide (and 3.x development snapshots are available)?

                 
                • Steve MacKinney

                  Steve MacKinney - 8 hours ago

                  True. That's what I'm going to do. Thanks.

                   

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.