View previous topic :: View next topic
|
Author |
Message |
syed-sameer-ahmed Warnings : 2 New User
Joined: 22 Feb 2007 Posts: 45 Location: Bangalore
|
|
|
|
Hi,
I have a cobol where i have defined the index variable.
buti am getting the error as
"VAR" was not a uniquely defined name. The definition to be used could not be determined from the context.The reference to the name was discarded.
the code is:
SEARCH WS-abc-VALUES
AT END DISPLAY 'UNABLE TO MOVE'
WHEN WS-xyz-ID(VAR) = WS-HOLD-xyz-CODE
but VAR is uniquely defined code..
my req is to pull the values from VSAM file and store it in a WS-TAble.
and search this table and move the corresponding values to it..
I really not getting what exactly is the error..
IF you have any other ideas too..its welcome..
Thanks! |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please post the array and the VAR variable. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
won't it be nice when people stop insisting the compiler made an error?
You could always check the xref from the compiler listing and see what 'stupid error the compiler has made'. |
|
Back to top |
|
|
balakrishna reddy
Active User
Joined: 13 Jul 2007 Posts: 128 Location: Guntur
|
|
|
|
Hi Sameer,
Please post your code, Use the code tag to post it. |
|
Back to top |
|
|
ramesh_ibm
New User
Joined: 17 Nov 2007 Posts: 16 Location: banglore
|
|
|
|
i think you have explicitly defined VAR.
since u r using search, VAR must be an index variable and should occur only once in table definition like
Code: |
occurs 10 r times indexed by var |
and should not be defined with PIC clause
I am sorry if that is not ur problem or my understanding is not proper..
if u paste ur code will try to help |
|
Back to top |
|
|
syed-sameer-ahmed Warnings : 2 New User
Joined: 22 Feb 2007 Posts: 45 Location: Bangalore
|
|
|
|
Hi people,
I am sorry for the reply..The VAR error is solved..
I had defined VAR as Usage is index at 88 level,which gave rise to error..
Thanks...
I came to know the various of creating a error in program.
Thanks again. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Thank you for posting the problem and solution
d |
|
Back to top |
|
|
|