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: Fri, 14 May 2021 09:44:44 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1

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]