Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 1777
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts FTP Skip or ignore error and process ... AJAYREDDY All Other Mainframe Topics 3 Wed Sep 27, 2017 8:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts FUSE - IBM MQ - CICS integration error Kevin Vaz CICS 1 Mon Sep 18, 2017 4:31 pm
No new posts Reply MQ open error Vignesh Sid COBOL Programming 6 Thu Sep 07, 2017 6:02 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us