Page 1 of 1

Ambiguous host variable.

Posted: Mon Nov 24, 2014 5:27 pm
by Ankur Goyal
Hi,

I've two tables with two DECLGENs. In these DECLGENs, I have same host variable names. Now how to refer the host variables of a particular table in the program? I get this error:

Code: Select all

 "HOST VARIABLE WS-SSN-NUMBER IS AMBIGUOUS". 

Re: Ambiguous host variable.

Posted: Mon Nov 24, 2014 9:30 pm
by zprogrammer
What you could do is something like below

WS-SSN-NUMBER IN <01 level OF DCLGEN>

If your DCLGEN is like

01 user
03 ws-ssn-number

Then you need to access like

WS-SSN-NUMBER IN USER

Re: Ambiguous host variable.

Posted: Tue Nov 25, 2014 6:17 pm
by Rahul Dhoble
Pandora-Box is correct. You've to use the "..OF 01-group-level" to distinguish the similar variable names.

Re: Ambiguous host variable.

Posted: Wed Nov 26, 2014 7:04 pm
by William Collins