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
How and when does the db2 enforces the unique key?
What is consistency token in db2?
What is bufferpool in db2?
What is innodb buffer pool?
How to find primary key of a table in db2?
What is the use of with ur in db2?
Is it possible to alter a table – for example adding a column, when another user is accessing or updating some columns?
What is view db2?
Can you tell me how can you find out the # of rows updated after an update statement?
What is the physical storage length of timestamp data type?
What is the role of data manager in the db2 database?
i tried to copy some records from microsoft excel to as-400 physical file through "Bosanova" emulation. Out of 14000 records only 12000 records copies and subsequently programe started to hang. Then, i closed the program forcefully. I did' under stand the problem. Also when i try to compile the physical file it is showing as "The file in use". How to overcome this problem?
What is lock escalation in db2?
How can deadlocks be resolved?
What is cloudant database?