Re: Question regarding uniqueness




Doug Miller wrote:
In article <f8cm2c$vpa$00$1@xxxxxxxxxxxxxxxxx>, "Roger While" <simrw@xxxxxxxxxxxx> wrote:
IDENTIFICATION DIVISION.
PROGRAM-ID. t11.
DATA DIVISION.
WORKING-STORAGE SECTION.

01 K525-AII-DRVR-RSTRT-DATA.
03 VARIABLE1 PIC X(8) VALUE SPACES.
03 K525-FRMT-FILE-ARRAY.
06 K525-FRMT-FILE-ARRAY-ROW
OCCURS 6 TIMES
ASCENDING KEY IS VARIABLE1.
09 VARIABLE1 PIC X(8) VALUE SPACES.
09 OTHER-DATA-ITEM PIC S9(5).
PROCEDURE DIVISION.
GOBACK.

This compiles with big iron and MF.
Why?

Because their parsers are broken.

Of course, this is a stupid definition.
Any attempt in the PROC div to reference any field
would lead to a compile failure.

The duplicate definition of VARIABLE1 should lead to an immediate compile
failure on any Cobol compiler.

OC throws this out at compile time.

As well it should. As should every Cobol compiler.


If the duplicate definition should lead to a compile time error then
why does every compiler allow the use of the duplicated FILLER?

Michael Mattias got it right (somewhere above this) when mentioning
QUALIFICATION.

.



Relevant Pages