[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [open-cobol-list] Latest tarball regression ?
From: |
John Culleton |
Subject: |
Re: [open-cobol-list] Latest tarball regression ? |
Date: |
Wed, 28 Jan 2009 11:42:43 -0500 |
User-agent: |
KMail/1.9.7 |
On Tuesday 27 January 2009 04:44:53 am Gary Cowell wrote:
> 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'
> goback.
>
> identification division.
> program-id. btest common.
> data division.
> working-storage section.
> procedure division.
> b-main1 section.
> display 'b-main1 atest'
> display myit1
> display myit2
> goback.
> 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?
>
> Gary
At first glance, why do you have two words in the PROGRAM-ID
paragraph? Try
PROGRAM ID. BTEST.
instead.
--
John Culleton
Resources for every author and publisher:
http://wexfordpress.com/tex/shortlist.pdf
http://wexfordpress.com/tex/packagers.pdf
http://www.creativemindspress.com/newbiefaq.htm
http://www.gropenassoc.com/TopLevelPages/reference%20desk.htm