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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

While unloading huge amount of data from table. Suddenly job failed some error. Imagine 1M data unloading, In that 90% data unloaded only 10% left, So if want to unload the rest 10% what needs to be done? Whether do i need to start from top or anything ?

1827


How would the varchar column remarks defined?

645


What r the comman abends in db2, jcl and cobol???????

1824


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?

2053


Why do we bind in db2?

638






What is the use of runstats in db2?

588


Can we insert update delete in view?

583


Is db2 a mainframe database?

573


What is the physical storage length of the data types date, time, and timestamp?

623


What is database alias db2?

619


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

722


what are bind concepts in db2 cobol?

655


Explain in detail about buffer manager and its functionalities?

572


What is performance tuning db2?

629


Why select is not preferred in embedded sql programs?

719