what is the difference between declaring the cursor in WS
section and Procedure division?



what is the difference between declaring the cursor in WS section and Procedure division?..

Answer / madhavi chava

As definition of cursor is non executable statement, it is
advisable not to define in procedure division as it may
misunderstood others.

we can define it any where only thing you have to take care
is definition of cursor should be prior to the OPEN
statement of the same cursor.

Is This Answer Correct ?    18 Yes 1 No

Post New Answer

More DB2 Interview Questions

Can we use select * statement in cobol program without giving field names ???

3 Answers   Zensar,


how do you resolve -818 error in db2. where we have to see time stamp token. i said by seeing in load module and plan .is it correct or not. give clear explination for how to see time stamp token

2 Answers   IBM, TRD,


What is the difference between oracle and db2?

1 Answers  


What are the abend codes occour in ur latest PROJECT in DB2

2 Answers   Cap Gemini,


is it possible to get -811 error when you use cursors. why?

2 Answers   IBM,


What is the use of commit in db2?

1 Answers  


Name the lockable units in DB2?

1 Answers  


How do I import a csv file into db2?

1 Answers  


What technique is used to retrieve data from more than one table in a single SQL statement?

9 Answers   CTS, IBM, TCS,


What is catalog database in db2?

1 Answers  


How do I import data from excel to db2?

1 Answers  


How many databases are there?

1 Answers  


Categories