I am getting a error multiple row fetched while executing a
Cobol-DB2 program.How can I solve it without using a cursor.
Answer Posted / raja mohan reddy
As of my knowledge,we cannot fetch multiple rows with out
using cursor in cobol db2, Let us see the breif explanation
When you are trying to fetch multiple rows with select
statement using perform loop it gives the result as
fetches the first row while fetching the second row program
will be end with sqlcode.
Here is the only one way to fetch multiple rows from db2
table using cobol. Please follw the following steps.
1.Declare a cursor ( we have to code SELECT statement with
our criteria)
2.Open the cursor
3.fetch the rows using cursor
4.Close the cursor
Please Let me know if you find any mis stated information
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is the difference between bind and rebind in db2?
What is the difference between drop table and delete table?
Explain correlated sub-queries.
Comment whether the cursor is closed during commit or not.
What is data manager?
Mention the location where the output received from explain statement is stored.
What is the difference between db2 and oracle?
what is the sqlcode -501
How to connect to db2 database from windows command line?
What do you mean by cursor?
What are the bind parameters ibm db2?
What is sqlca?
What is dpf in db2?
Is ibm db2 open source?
How can the duplicate values be eliminated from db2 select?