Skip to main content

Hi,

which compiler directive I can use for check if data item is defined only once with the same name ?

es:

01 NOME-PROG PIC X(08) VALUE "IXXR".

01 NOME-PROG PIC X(08) VALUE "IXXR".

and the compiler should give the following error:

COBCH0005S User-name FLS not unique

thank
bye

Hi,

which compiler directive I can use for check if data item is defined only once with the same name ?

es:

01 NOME-PROG PIC X(08) VALUE "IXXR".

01 NOME-PROG PIC X(08) VALUE "IXXR".

and the compiler should give the following error:

COBCH0005S User-name FLS not unique

thank
bye
There is no directive of which I am aware that will flag a duplicate name as this is a perfectly legitimate construct in COBOL.

Where you will receive the error is when you try to reference a data-item that is not unique without qualifying it.
Example, if I add the statement:
display nome-prog

Then the statement will cause the COBCH0005 error that you mention above.

Hi,

which compiler directive I can use for check if data item is defined only once with the same name ?

es:

01 NOME-PROG PIC X(08) VALUE "IXXR".

01 NOME-PROG PIC X(08) VALUE "IXXR".

and the compiler should give the following error:

COBCH0005S User-name FLS not unique

thank
bye
thanks Chris...

bye