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...

Cursors can be declared in both working-storage & procedure
division, Agreed.
But is there any difference? If could you please suggest
what is the difference.
TIA

Answer Posted / budgobbel

In CICS programs, data is passed in the Communications Area (CA) via the Linkage Section.

If your cursor is predicated (WHERE clause) on a field in the CA, you could code your cursor early in the Procedure Division prior to any open cursor logic. This will avoid using additional variables, and MOVE statements.

If you keep your cursor in the Working Storage area, you cannot use fields in the Linkage section as host variables, because the DB2 pre-compiler will see the cursor first, and NOT have a resolution for the host variable (it hasn't seen the Linkage Section, yet).

It mostly is up to you, unless your shop is a stickler on variables and locations, etc.

Also, over the years I have seen shops become more code-it-and-load-it in philosophy. Very sad.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you tell me how can you find out the # of rows updated after an update statement?

1101


How can you quickly find out the # of rows updated after an update statement?

1052


Explain package in db2 and its advantages?

1221


Which are the db2 tools to protect integrity of the database?

1125


What is a collection in db2?

1042


What is a plan and package in db2?

1108


Differentiate between cs and rr isolation levels? Where do you specify them?

1074


Mention data types used in db2 ?

1166


What is meant by union and union all?

1013


B37 abend during spufi?

1463


I have a subprogram B calling from mainprogram A.I have opened a cursor in A ,Can i fetch the same cursor in subprogram B , If yes , Please explain the reason?

2396


What is plan in cobol db2?

1145


What is difference between isnull and coalesce?

1061


What is cursor with hold option in db2?

1085


Who uses db2?

1057