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 "db2ilist" and "db2 get instance" commands in DB2 Database Server?
Hi, i would like to start a new carrier in DB2 DBA.Which and what all step should i have to take..?
What are bind parameters in db2?
How can you do the explain of a dynamic sql statement?
Mention the different locking levels that are available in db2.
What action db2 takes when a program aborts in the middle of a transaction?
Is db2 free?
B37 abend during spufi?
How can we retrieve the total number of records in RPG & CLLE?
What is bind in db2?
What is difference between alias and synonym in db2?
What are db2 objects?
Mention data types used in db2 ?
Suppose pgm A calling Pgm B .Pgm B has some Db2 program. at the time of compilation should plan and package will be created for both A and B or only B? What is the concept?
How do I copy a table in db2?