hi,
if u want to retrive more than 1 row thru cobol program then u have to use CURSOR.
CURSOR :- The basic function is to retrieve more than 1 rows from the
table.
CURSOR BLOCK :-
There r 4 blocks in cursor.
1st the cursor need to be declared by using DECLARE cmd.
2nd the cursor has to be opened by using OPEN cmd.
3rd the cursor has to fetch the rows by using FETCH cmg.
lastly the cursor has to be closed by using CLOSE cmd.
cant we retrive more than one row using SELECT query?
we can retrive only one row using CURSOR from the no.of rows which are retrived using SELECT query.i think CURSOR is only just like one pointer to the each row.becoz we will mention the host variables in the cursor it will retrive only one row by putting in loop it will retrive the rows one by one ok please check it out and if any thing is wrong let me know.
if you r making a full key select then the rows updated will be one.
but if you have a partial key then you can update multiple rows with a simple select query.