PREPARE SEL2 FROM :WS-SQL-AREA-G
DESCRIBE SEL2 INTO :SQLDA2
USING DESCRIPTOR :SQLDA2
THe problem statement : while fetching the data from the cursor. we expect the cursor to stop after a year and quarter is processed. Say we want to fetch the data for 2012 and 4th quarter, cursor doesnt stop after all the data for the above mentioned year and quarter is processed and did not give a SQL code 100 after all the rows have been processed. Instead the cursor continues to fetch the data for 2013 and 1st quarter as well .