Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How do I import a csv file into db2?

946


How to access db2 tables in mainframe?

1005


SET is the ANSI standard for variable assignment, SELECT is not. SET can only assign one variable at a time, SELECT can make multiple assignments at once. If assigning from a query, SET can only assign a scalar value. If the query returns multiple values/rows then SET will raise an error. SELECT will assign one of the values to the variable and hide the fact that multiple values were returned (so you'd likely never know why something was going wrong elsewhere - have fun troubleshooting that one) When assigning from a query if there is no value returned then SET will assign NULL, where SELECT will not make the assignment at all (so the variable will not be changed from it's previous value) As far as speed differences - there are no direct differences between SET and SELECT. However SELECT's ability to make multiple assignments in one shot does give it a slight speed advantage over SET.

2605


What is the role of union all and union

1082


On which levels locks can be applied?

1070


What is the difference between drop table and delete table?

1133


What are iseries servers?

1023


What are types of indexes?

1006


How do I add a column to an existing table in db2?

981


What do you mean by between and in? Is between inclusive of specified range values?

1049


If the cursor is kept open followed the issuing of commit, what is the procedure to leave the cursor that way?

1104


What is the difference between "db2ilist" and "db2 get instance" commands in DB2 Database Server?

1233


How does a cursor work?

933


can we view the access paths created by dbrm ? how ? thx

6993


What is check constraint. Explain with example.

1051