• Package name Gnu-COBOL or Open-COBOL?

    From Hugh Sweeney@1:2320/100 to comp.lang.cobol on Mon Jun 12 11:50:51 2017
    From Newsgroup: comp.lang.cobol

    I'm currently on Ubuntu 12.04 running version: "cobc (OpenCOBOL) 1.0.0".
    I'm starting to hit problems that I can't diagnose, like a segfault in the compiler (below). I don't expect anyone is going to support this old version, so I'm thinking of installing Gnu COBOL. However I have a couple of questions maybe someone here can answer:
    1. At sourceforge.net/projects/open-cobol/ it says "GnuCOBOL 2.0 is on rc-2 close to release". Does this mean I should wait for release, or install rc-2? 2. Is the package name still open-cobol or gnu-cobol? If the latter, will apt-get simply install new executables and libraries without checking for existing files of the same name? Should I uninstall open-cobol first?
    In case anyone's interested in seeing if the segfault still exists in Gnu COBOL, here's a minimal source program that triggers it for me:
    --
    id division.
    program-id. cobcbug.
    author. Hugh Sweeney.
    environment division.
    input-output section.
    file-control.
    select listing assign to "uin"
    organization is line sequential.
    data division.
    file section.
    fd listing.
    01 inrec pic x(80).
    working-storage section.
    77 linenumber pic 99999 value 0 comp.
    77 sub1 pic 9 comp.
    01 value all "X".
    10 pic x.
    88 looks-like-statement-start value "T" False is "F".
    01 grp6.
    05 sgrp6 pic x(6). *> Extra lines I inserted...
    05 filler redefines sgrp6. *> ...to work around segfault.
    10 num6 pic 9 occurs 6.
    procedure division.
    if inrec(sub1:sub1) is numeric
    move inrec(sub1:sub1) to num6(sub1)
    else
    if inrec(sub1:sub1) = space
    if grp6(1:sub1) = linenumber + 1 *> Segfault.
    * if sgrp6(1:sub1) = linenumber + 1 *> Compiles ok.
    set looks-like-statement-start to true
    end-if
    end-if
    end-if
    .
    --
    and here's what I see when I try to compile it:
    cobc -Ox cobcbug.cbl
    Segmentation fault (core dumped)

    Uncommenting the commented line in the proc div and commenting the prior line results in a clean compile. Knowing this user, the prior line is probably a user error, but the segfault is beyond my ability to fix.
    Hugh
    --

    SEEN-BY: 154/30 2320/100 0 1 227/0
  • From Vince Coen@1:2320/100 to Hugh Sweeney on Tue Jun 13 00:16:14 2017
    From Newsgroup: comp.lang.cobol

    Hello Hugh!

    Monday June 12 2017 19:50, Hugh Sweeney wrote to All:

    I have been using v2.0 for 6 or more years.

    It is used to build my ACAS accounting system that consists of over 200
    modules and programs and these have run solidly since with the only
    problems being my code changes that have introduced bugs (in my code).

    It now is used to to migrate ACAS into Mysql. I have also used it to run
    tests on Oracle and DB2 with success.

    A large numerb of commercial shops have been using it in excess for two
    years and I am saying that because I do not know the actual timeframe for
    them but I do know that is is used in thousands of sites / systems.

    Is that good enough?

    This is not to say that there is no bugs, of course there is with the
    reported open bug count of 83, with a total of 177. Note too bad for seven years of using and testing.

    Vince



    I'm currently on Ubuntu 12.04 running version: "cobc (OpenCOBOL)
    1.0.0".

    I'm starting to hit problems that I can't diagnose, like a segfault in
    the compiler (below). I don't expect anyone is going to support this
    old version, so I'm thinking of installing Gnu COBOL. However I have a couple of questions maybe someone here can answer:

    1. At sourceforge.net/projects/open-cobol/ it says "GnuCOBOL 2.0 is on
    rc-2 close to release". Does this mean I should wait for release, or
    install rc-2?

    2. Is the package name still open-cobol or gnu-cobol? If the latter,
    will apt-get simply install new executables and libraries without
    checking for existing files of the same name? Should I uninstall
    open-cobol first?

    In case anyone's interested in seeing if the segfault still exists in
    Gnu COBOL, here's a minimal source program that triggers it for me: --
    id division.
    program-id. cobcbug.
    author. Hugh Sweeney.
    environment division.
    input-output section.
    file-control.
    select listing assign to "uin"
    organization is line sequential.
    data division.
    file section.
    fd listing.
    01 inrec pic x(80).
    working-storage section.
    77 linenumber pic 99999 value 0 comp.
    77 sub1 pic 9 comp.
    01 value all "X".
    10 pic x.
    88 looks-like-statement-start value "T" False is "F".
    01 grp6.
    05 sgrp6 pic x(6). *> Extra lines I inserted...
    05 filler redefines sgrp6. *> ...to work around segfault.
    10 num6 pic 9 occurs 6.
    procedure division.
    if inrec(sub1:sub1) is numeric
    move inrec(sub1:sub1) to num6(sub1)
    else
    if inrec(sub1:sub1) = space
    if grp6(1:sub1) = linenumber + 1 *> Segfault.
    * if sgrp6(1:sub1) = linenumber + 1 *> Compiles ok.
    set looks-like-statement-start to true
    end-if
    end-if
    end-if
    .
    --
    and here's what I see when I try to compile it:
    cobc -Ox cobcbug.cbl
    Segmentation fault (core dumped)

    Uncommenting the commented line in the proc div and commenting the
    prior line results in a clean compile. Knowing this user, the prior
    line is probably a user error, but the segfault is beyond my ability
    to fix.

    Hugh
    --



    Vince

    SEEN-BY: 154/30 2320/100 0 1 227/0
  • From Hugh Sweeney@1:2320/100 to comp.lang.cobol on Thu Jun 15 03:03:49 2017
    From Newsgroup: comp.lang.cobol

    On Tuesday, 13 June 2017 00:25:57 UTC+1, Vince Coen wrote:
    Hello Hugh!

    Monday June 12 2017 19:50, Hugh Sweeney wrote to All:

    I have been using v2.0 for 6 or more years.

    It is used to build my ACAS accounting system that consists of over 200 modules and programs and these have run solidly since with the only
    problems being my code changes that have introduced bugs (in my code).

    It now is used to to migrate ACAS into Mysql. I have also used it to run tests on Oracle and DB2 with success.

    A large numerb of commercial shops have been using it in excess for two
    years and I am saying that because I do not know the actual timeframe for them but I do know that is is used in thousands of sites / systems.

    Is that good enough?

    Thanks Vince. That's good enough evidence for me.

    So I issued
    apt-get remove open-cobol (completed ok)
    apt-get install gnu-cobol
    but the second command generated message "E: Unable to locate package gnu-cobol"
    so it looks like I was wrong to assume that Gnu COBOL can be installed by this method. Can anyone tell me what method to use on Ubuntu 12.04 please.

    tia
    Hugh
    --

    SEEN-BY: 154/30 2320/100 0 1 227/0
  • From Arnold Trembley@1:2320/100 to comp.lang.cobol on Fri Jun 16 03:13:30 2017
    From Newsgroup: comp.lang.cobol

    On 6/15/2017 5:03 AM, Hugh Sweeney wrote:
    On Tuesday, 13 June 2017 00:25:57 UTC+1, Vince Coen wrote:
    Hello Hugh!

    Monday June 12 2017 19:50, Hugh Sweeney wrote to All:

    I have been using v2.0 for 6 or more years.
    (snip)

    Thanks Vince. That's good enough evidence for me.

    So I issued
    apt-get remove open-cobol (completed ok)
    apt-get install gnu-cobol
    but the second command generated message "E: Unable to locate package
    gnu-cobol"
    so it looks like I was wrong to assume that Gnu COBOL can be installed by
    this method. Can anyone tell me what method to use on Ubuntu 12.04 please.

    tia
    Hugh
    --


    If you don't get an answer here, you can get a quicker answer from the compiler authors on the SourceForge project:

    https://sourceforge.net/projects/open-cobol/

    https://sourceforge.net/p/open-cobol/discussion/

    You don't have to register to ask questions in the discussion forum, but
    it's free to register, and your post won't be delayed for review by a moderator.

    I use GnuCOBOL 2.0 RC2 in Windows/MinGW, but I don't know the exact
    procedure for installing in Linux. But they will know in the forum,
    because I have seen that question come up before.

    Kind regards,


    --
    http://www.arnoldtrembley.com/

    SEEN-BY: 154/30 2320/100 0 1 227/0
  • From Vince Coen@1:2320/100 to Hugh Sweeney on Fri Jun 16 14:27:24 2017
    From Newsgroup: comp.lang.cobol

    Hello Hugh!

    Thursday June 15 2017 11:03, Hugh Sweeney wrote to All:

    On Tuesday, 13 June 2017 00:25:57 UTC+1, Vince Coen wrote:
    Hello Hugh!

    Monday June 12 2017 19:50, Hugh Sweeney wrote to All:

    I have been using v2.0 for 6 or more years.

    It is used to build my ACAS accounting system that consists of over
    200 modules and programs and these have run solidly since with the
    only problems being my code changes that have introduced bugs (in my
    code).

    It now is used to to migrate ACAS into Mysql. I have also used it to
    run tests on Oracle and DB2 with success.

    A large numerb of commercial shops have been using it in excess for
    two years and I am saying that because I do not know the actual
    timeframe for them but I do know that is is used in thousands of
    sites / systems.

    Is that good enough?

    Thanks Vince. That's good enough evidence for me.

    So I issued
    apt-get remove open-cobol (completed ok)
    apt-get install gnu-cobol
    but the second command generated message "E: Unable to locate package gnu-cobol" so it looks like I was wrong to assume that Gnu COBOL can
    be installed by this method. Can anyone tell me what method to use on
    Ubuntu 12.04 please.

    Having removed the old version and using a terminal create a directory for
    the compilers, e.g,

    mkdir cobolcompilers

    Then issue

    svn checkout https://svn.code.sf.net/p/open-cobol/code/trunk
    open-cobol-code

    Now in dir, open-cobol-code will be the sources for the compiler now follow
    and install if required the needed packages using your package manager then enter the new directory and run:

    /configure
    make checkall

    if worked with no errors run sudo make install

    You are now ready to work so move out of the compiler directories into the
    one used for your Cobol sources.




    Vince

    SEEN-BY: 154/30 2320/100 0 1 227/0
  • From Vince Coen@1:2320/100 to Hugh Sweeney on Fri Jun 16 15:16:15 2017
    From Newsgroup: comp.lang.cobol

    Hello Hugh!

    Thursday June 15 2017 11:03, Hugh Sweeney wrote to All:

    On Tuesday, 13 June 2017 00:25:57 UTC+1, Vince Coen wrote:
    Hello Hugh!

    Monday June 12 2017 19:50, Hugh Sweeney wrote to All:

    I have been using v2.0 for 6 or more years.

    It is used to build my ACAS accounting system that consists of over
    200 modules and programs and these have run solidly since with the
    only problems being my code changes that have introduced bugs (in my
    code).

    It now is used to to migrate ACAS into Mysql. I have also used it to
    run tests on Oracle and DB2 with success.

    A large numerb of commercial shops have been using it in excess for
    two years and I am saying that because I do not know the actual
    timeframe for them but I do know that is is used in thousands of
    sites / systems.

    Is that good enough?

    Thanks Vince. That's good enough evidence for me.

    So I issued
    apt-get remove open-cobol (completed ok)
    apt-get install gnu-cobol
    but the second command generated message "E: Unable to locate package gnu-cobol" so it looks like I was wrong to assume that Gnu COBOL can
    be installed by this method. Can anyone tell me what method to use on
    Ubuntu 12.04 please.

    Preious post I gave a process that results in the wrong version (1.1) being provided so use this process instead:

    with browser select : https://sourceforge.net/p/open-cobol/code/HEAD/tree/branches/gnu-cobol-2.0/

    Now select Download snapshot and you will get a zipped archive of the
    current compiler sources.




    Vince

    SEEN-BY: 154/30 2320/100 0 1 227/0