IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Error: 'REFERENCE TO HOST VARIABLE IS AMBIGUOUS'


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
MUTHUSMCA

New User


Joined: 14 May 2005
Posts: 2
Location: Chennai

PostPosted: Fri Sep 08, 2006 12:20 pm
Reply with quote

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
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Sat Sep 09, 2006 9:34 pm
Reply with quote

Could u please provide ur sql
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Sun Sep 10, 2006 9:34 am
Reply with quote

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
View user's profile Send private message
MUTHUSMCA

New User


Joined: 14 May 2005
Posts: 2
Location: Chennai

PostPosted: Mon Sep 11, 2006 9:33 am
Reply with quote

INSERT INTO DEMO
VALUES(:HV-EMPNO,:HV-NAME)


----- this is my sql guptae !!

--have a note on this....
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Mon Sep 11, 2006 10:29 am
Reply with quote

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
View user's profile Send private message
kgumraj

Active User


Joined: 01 May 2006
Posts: 151
Location: Hyderabad

PostPosted: Mon Sep 11, 2006 10:36 pm
Reply with quote

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
View user's profile Send private message
parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Tue Sep 12, 2006 5:44 pm
Reply with quote

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
View user's profile Send private message
santohsks1987
Warnings : 1

New User


Joined: 29 Dec 2010
Posts: 31
Location: Mumbai

PostPosted: Fri May 06, 2011 2:21 pm
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri May 06, 2011 3:04 pm
Reply with quote

Begin by not tacking your query onto a thread that has been quiescent for over four and a half years.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> ABENDS & Debugging

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Variable Output file name DFSORT/ICETOOL 8
Search our Forums:

Back to Top