Page 1 of 1

"not uniquely defined" error in COBOL.

Posted: Mon Sep 21, 2015 3:50 pm
by Akshypal
In a COBOL program I have the following defitions

Code: Select all

01  VCT11DCA EXTERNAL. 
    05  FGEHA         OCCURS 100 USAGE IS POINTER. 
    05  FILLER                   PIC X(4). 
and

Code: Select all

01  VCT11ACD EXTERNAL. 
    05  FGEHA         OCCURS 100 USAGE IS POINTER. 
    05  FILLER                   PIC X(4). 
Later in the programI use

Code: Select all

 SET FGEHA(001) OF VCT11DCA TO ADDRESS OF ADDRSVAR
But this ends in error with "FGEHA is not uniqiely defined". What should I do so the error does not occur.

Re: "not uniqiely defined" error in COBOL.

Posted: Mon Sep 21, 2015 3:52 pm
by zprogrammer
You need to inform to which 01 level you are trying to set

Re: "not uniquely defined" error in COBOL.

Posted: Mon Sep 21, 2015 4:19 pm
by William Collins
It is the name that you are qualifying, so you qualify first and then subscript:

Code: Select all

 SET FGEHA OF VCT11DCA ( 001 )
                            TO ADDRESS OF ADDRSVAR

Re: "not uniquely defined" error in COBOL.

Posted: Tue Sep 22, 2015 2:42 pm
by Akshypal
William Collins wrote:It is the name that you are qualifying, so you qualify first and then subscript:

Code: Select all

 SET FGEHA OF VCT11DCA ( 001 )
                            TO ADDRESS OF ADDRSVAR
Excellent! Thanks William. :D