[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[open-cobol-list] Latest tarball regression ?

From: Gary Cowell
Subject: [open-cobol-list] Latest tarball regression ?
Date: Tue, 27 Jan 2009 09:44:53 +0000 (GMT)

The following program used to compile with one of the 1.1 tarballs, now it does not:

        identification division.
        program-id. atest.
        data division.
        working-storage section.
        01      myitems GLOBAL.
                03 myit1 pic x(10).
                03 myit2 pic 9.
        procedure division.
        a-main1 section.
                move 'hello' to myit1
                move 8 to myit2
                display 'a-main1 atest'
                display myit1
                display myit2
                call 'btest'
                display 'bye'

        identification division.
        program-id. btest common.
        data division.
        working-storage section.
        procedure division.
        b-main1 section.
                display 'b-main1 atest'
                display myit1
                display myit2
        end program btest.
        end program atest.

It gives the following error:

atest.cbl: In section 'a-main1':
atest.cbl:20: Error: COMMON may only be used in a nested program
atest.cbl:20: Error: syntax error, unexpected '.', expecting RECURSIVE or "INITIAL"

But COMMON is in the nested program, is it not?

I think this has regressed a little or perhaps my understanding of COMMON is faulty?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]