View previous topic :: View next topic
|
Author |
Message |
palas_08 Currently Banned New User
Joined: 26 Feb 2007 Posts: 9 Location: kolkatta
|
|
|
|
is there any diff. between the curser declaration in procedure div. & working storage section ?
------ plz tell as soon as possible |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
Back to top |
|
|
mkk157
Active User
Joined: 17 May 2006 Posts: 310
|
|
|
|
Hi guptae,
In the link provided by u, All gave their assumptions but none are confident. Can somebody else please give the exact answer here. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
mkk157 wrote: |
In the link provided by u, All gave their assumptions but none are confident. Can somebody else please give the exact answer here. |
You are right, a lot of assumptions, some wrong. But it all boils down to:
Quote: |
A static cursor needs to be declared before it is opened. The DB2 preprocesser needs to see it before it generates the code for accessing it. .........the declaration generates no executable code in itself so it is usually placed in the data division, that helps keep the procedure division cleaner and easier to see the logic flow. |
|
|
Back to top |
|
|
vini_srcna
Active User
Joined: 26 May 2005 Posts: 178 Location: Copenhagen, Denmark
|
|
|
|
Thats right. You can see the precompiled code. The precompiler just comments the CURSOR decalaration and does not put any code as a replacement for that.
Where as after Fetch you could see the equivalent DSNHLI calls. |
|
Back to top |
|
|
|