"not uniquely defined" error in COBOL.

OS/VS COBOL, COBOL II, Enterprise COBOL for z/OS. OpenCOBOL and OOCobol.
Post Reply
Akshypal
Registered Member
Posts: 54
Joined: Sun Jun 16, 2013 9:51 am

"not uniquely defined" error in COBOL.

Post 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.
zprogrammer
Global Moderator
Global Moderator
Posts: 588
Joined: Wed Nov 20, 2013 11:53 am
Location: Mars

Re: "not uniqiely defined" error in COBOL.

Post by zprogrammer »

You need to inform to which 01 level you are trying to set
zprogrammer
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: "not uniquely defined" error in COBOL.

Post 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
Akshypal
Registered Member
Posts: 54
Joined: Sun Jun 16, 2013 9:51 am

Re: "not uniquely defined" error in COBOL.

Post 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
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM COBOL, GnuCOBOL (OpenCOBOL), OOCobol.”