[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [open-cobol-list] Latest tarball regression ?
From: |
Bill Klein |
Subject: |
Re: [open-cobol-list] Latest tarball regression ? |
Date: |
Wed, 28 Jan 2009 11:02:02 -0600 |
"common" (and "initial") are valid in the program-id with the '85 Standard.
("recursive" was added in the '02 Standard).
For what they do, see your documentation <G>
> -----Original Message-----
> From: John Culleton [mailto:address@hidden
> Sent: Wednesday, January 28, 2009 10:43 AM
> To: address@hidden
> Subject: Re: [open-cobol-list] Latest tarball regression ?
>
> 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
>
> --------------------------------------------------------------
> ----------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> open-cobol-list mailing list
> address@hidden
> https://lists.sourceforge.net/lists/listinfo/open-cobol-list
>