In easytrieve i am trying to fetch data from DB2 table which is returning multiple values for a variable .
Can anybody suggest how can i do that
CURSOR
SQL DECLARE CURSOR3 CURSOR FOR +
SELECT CHAR(YEAR(DATE(CURRENT DATE))-YEAR(DATE(B.CICL_DOB_DT))) +
FROM CILXA1A.TRV_TRAVELLER A , CILXA1A.CLIENT_TAB B +
WHERE A.POLICY_ID = :I-POLICY-ID +
AND A.NON_TRAVEL_IND = 'N' +
AND A.CLIENT_ID = B.CLIENT_ID +
AND B.HISTORY_VLD_NBR = 0 +
FOR READ ONLY
SELECT CHAR(YEAR(DATE(CURRENT DATE))-YEAR(DATE(B.CICL_DOB_DT))) +
FROM CILXA1A.TRV_TRAVELLER A , CILXA1A.CLIENT_TAB B +
WHERE A.POLICY_ID = :I-POLICY-ID +
AND A.NON_TRAVEL_IND = 'N' +
AND A.CLIENT_ID = B.CLIENT_ID +
AND B.HISTORY_VLD_NBR = 0 +
FOR READ ONLY
This query is returning multiple rows/values. How can these values be capture in fetch statement , probably can be arrary ...
but i have no idea how to do that
SQL OPEN CURSOR3
SQL FETCH CURSOR3 INTO :W-REP-AGE }-- how to store multiple values
SQL CLOSE CURSOR3
need it uregent , can anybody help ...
thanks a lot