Retrieving multiple rows of data into host-variable arrays
If you know that your query returns multiple rows, you can specify host-variable arrays to store the retrieved column values.
About this task
You can use host-variable arrays to specify a program data area to contain multiple rows of column values. A Db2 rowset cursor enables an application to retrieve and process a set of rows from the result table of the cursor.