bug-gnucobol
[Top][All Lists]
Advanced

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

Re: Key Names Not Known in Nested Programs


From: Simon Sobisch
Subject: Re: Key Names Not Known in Nested Programs
Date: Wed, 7 Jul 2021 13:26:56 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

Fixed and checked in with revision r4270 [1] - thanks again @Charles for
providing the bug report and test case.

Simon

[1] https://sourceforge.net/p/gnucobol/code/4270

Am 14.05.2021 um 09:44 schrieb Simon Sobisch:
Thank you for the bug report. GnuCOBOL was wrong here, the standard
explicit says under "scope of record-key-names":

 > The record-key-name defined by a SOURCE phrase in the ALTERNATE
RECORD KEY clause [...] is global if the GLOBAL clause is specified in
the file description entry for that file

This has to be added in cobc/tree.c (finalize_file), I'm going to commit
the fix soon and the bugfix will be available in GnuCOBOL 3.2.

Thanks for pointing that out and providing the good test case,
Simon

Am 22.03.2021 um 19:44 schrieb Charlie Anderson:
See attached "NestedKeyBut.CBL".

Example is code which a key name compiles OK in the base program but
causes one syntax error in the nested program. Strangely, only the first
occurrence of the use of a key name in the nested program is reported as
an error " 'People-NameKey' is not defined ".

I have used the key name syntax in earlier COBOL 1985/89 implementations
extensively and it is very useful.

Charles T. Anderson




reply via email to

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