View previous topic :: View next topic
|
Author |
Message |
brahmanandareddy
New User
Joined: 16 Dec 2004 Posts: 44 Location: Hyderabad
|
|
|
|
Hi,
Why do we declare the cursors only in working storage section. Though we can declare them either in working storage section or in procedure division, why would we go for working storage section only?
Thank you,
Brahma |
|
Back to top |
|
|
Lkmi
New User
Joined: 04 Mar 2005 Posts: 53 Location: Newyork
|
|
|
|
there is no hard and fast rule about the declaration. My shop uses declarations in the procedure division too.. |
|
Back to top |
|
|
manjinder
New User
Joined: 04 Dec 2005 Posts: 45 Location: pune
|
|
|
|
as we know declaration of cursor is non executable statements ,so we can give it in working sto section for just checking it and we can also declare it in P.D.
regard..
manjinder |
|
Back to top |
|
|
prabs2006
Active User
Joined: 12 Jan 2006 Posts: 103
|
|
|
|
Hi Friends,
I believe there should be some diff when declaring the Cursor in W/S section against the Procedure div section.It would be nice if someone comes up with a definite answer.Please rectify me if am wrong.
Thanks & Regards
Prabs |
|
Back to top |
|
|
vikasc4
New User
Joined: 11 Dec 2005 Posts: 32
|
|
|
|
Hi prabs,
As far as the declaration is concerned there is no difference in declaring the cursor in W/S or P.D. You can declare it any where and it will not effect the running or compiling of program. As cursor will contain some data (Row of a table) so it is a normal practice to declare it in W/S.
Thanks & Regards
Vikas |
|
Back to top |
|
|
prabs2006
Active User
Joined: 12 Jan 2006 Posts: 103
|
|
|
|
Thats fine..Thanks |
|
Back to top |
|
|
|