Can you use a select query in a loop to fetch multiple rows?
If so what is the advantage of using a cursor?

Answer Posted / azharuddinsyed

No. In cobol-db2 program, the result of single select should be only one row.
For multi row fetch we must use cursor, else program will abend with -811 sql code.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a storage group (stogroup)?

984


Is db2 a mainframe?

773


What do you mean by cursor?

769


Explain the benefits you can get from mainframe connect?

717


Can one database have multiple instances?

782


What action db2 takes when a program aborts in the middle of a transaction?

865


What is db2 bind process?

917


Which isolation level provides maximum concurrency?

881


what is utility for parm lib

2091


can any one provide me the link for the db2 v7 & db2 v8 manual for Z/os? i need to know about the syntax of REORG in both versions & need to know the difference as well

1996


What are sqlcodes –803,-805, -811, -818,-904,-911,-913,-101, +100?

941


Mention data types used in db2 ?

872


What is db2 look?

769


Explain db2.

803


Mention the different locking levels that are available in db2.

833