Page 1 of 1

DB2 interview question on fetching rows.

Posted: Fri Jan 14, 2022 8:32 pm
by Sanjay Mainframe
Hi All,

I have been asked this interview question which I could not answer - How to fetch multiple rows and move to output(30 occurrences)?

Can someone please help me with some answer or direction.

Re: DB2 interview question on fetching rows.

Posted: Wed Jan 26, 2022 10:33 pm
by Anuj Dhawan
CURSOR with or without ROWSET POSITIONING can be used. 'Host-variable-array' should be defined with 30-occurrences for your example.

Hope this helps.