Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Error: 'REFERENCE TO HOST VARIABLE IS AMBIGUOUS'

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging
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    Post subject: Error: 'REFERENCE TO HOST VARIABLE IS AMBIGUOUS'
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: 1187
Location: Bangalore,India

PostPosted: Sat Sep 09, 2006 9:34 pm    Post subject:
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: 1452
Location: Chicago, IL

PostPosted: Sun Sep 10, 2006 9:34 am    Post subject: Re: Error: 'REFERENCE TO HOST VARIABLE IS AMBIGUOUS'
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    Post subject: Reg: Reference Variable error
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: 1187
Location: Bangalore,India

PostPosted: Mon Sep 11, 2006 10:29 am    Post subject:
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    Post subject: Re: Error: 'REFERENCE TO HOST VARIABLE IS AMBIGUOUS'
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    Post subject:
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    Post subject:
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: 1771
Location: Bloomington, IL

PostPosted: Fri May 06, 2011 3:04 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts StreamWeaver language reference chetanambi Compuware & Other Tools 1 Wed Jul 05, 2017 12:50 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Can I traverse a STEM variable? chong.zhou CLIST & REXX 5 Wed May 31, 2017 3:54 pm
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us