View previous topic :: View next topic
|
Author |
Message |
MUTHUSMCA
New User
Joined: 14 May 2005 Posts: 2 Location: Chennai
|
|
|
|
hi,
i am geetting the error like
---REFERENCE TO HOST VARIABLE HV-EMPNO IS AMBIGUOUS
---REFERENCE TO HOST VARIABLE HV-NAME IS AMBIGUOUS
i have included DCLGEN member in my program |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Could u please provide ur sql |
|
Back to top |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Quote: |
The host variable name was defined more than once in this application program. The precompiler cannot distinguish which host variable definition should be used here. |
Check here in the manual for reference on this problem... |
|
Back to top |
|
|
MUTHUSMCA
New User
Joined: 14 May 2005 Posts: 2 Location: Chennai
|
|
|
|
INSERT INTO DEMO
VALUES(:HV-EMPNO,:HV-NAME)
----- this is my sql guptae !!
--have a note on this.... |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi MUTHUSMCA,
Ur host variable might be declare like that
01 WS-VAR.
10 HV-EMPNO PIC X(10).
10 HV-NAME PIC X(30).
Then try to use it like
INSERT INTO DEMO
VALUES (:WS-VAR.HV-EMPNO, :WS-VAR.HV-NAME)
Hope it will helpful |
|
Back to top |
|
|
kgumraj
Active User
Joined: 01 May 2006 Posts: 151 Location: Hyderabad
|
|
|
|
Ambiguous is a condition where the variable used is used two times check for it. If you are using just once then.
You check for expanded program in the spool, so that it occurs, I feel your can solve it by using PARM=SOURCE, when you precompile the program in the JCL |
|
Back to top |
|
|
parikshit123
Active User
Joined: 01 Jul 2005 Posts: 269 Location: India
|
|
|
|
Hi,
seems like you have declared your host variable at more than one places. One in the DCLGEN member and the other in the working-storage/linkage section. |
|
Back to top |
|
|
santohsks1987 Warnings : 1 New User
Joined: 29 Dec 2010 Posts: 31 Location: Mumbai
|
|
|
|
Hi everybody,
I am also having the same problem but i have not declared in more than 1 place. But i have added many DCLGEN's which has the same variable in all the DCLGEN's. So how can I solve this problem. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Begin by not tacking your query onto a thread that has been quiescent for over four and a half years. |
|
Back to top |
|
|
|