hai to every one,
i have a proble in db2 cobol program regarding fetching data from multiple table through Cursor for Select
I have 2 table with DEPTNO on both tables
I genarated host variables through DCLGEN
table description is
EMP DEPT
---- ---------
EMPNO DEPTNO
NAME DEPTDES
DEPTNO
when writing code in cobol
exec sql
DECLARE cur1 CURSOR FOR
select empno,
name,
deptno,
deptdes
from emp e,
dept d
where e.deptnp=d.deptno
end-exec
Here there is no problem
In Below code there is a problem
In FETCH it is showing Ambiquety in hv:deptno
exec sql
fetch cur1
into :hv-empno,
:hv-name,
:hv-deptno,
:hv-deptdes
end-exec.
plz help me