Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

curser declaration in procedure div. & ws-section

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
palas_08
Currently Banned

New User


Joined: 26 Feb 2007
Posts: 9
Location: kolkatta

PostPosted: Wed Mar 21, 2007 10:26 am    Post subject: curser declaration in procedure div. & ws-section
Reply with quote

is there any diff. between the curser declaration in procedure div. & working storage section ?
------ plz tell as soon as possible
Back to top
View user's profile Send private message

guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Wed Mar 21, 2007 10:32 am    Post subject:
Reply with quote

Hi There,


Topic is already discussed
http://www.ibmmainframes.com/viewtopic.php?t=18335&highlight=cursor+declare
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Wed Mar 21, 2007 5:28 pm    Post subject: Re: curser declaration in procedure div. & ws-section
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Mar 21, 2007 5:39 pm    Post subject: Re: curser declaration in procedure div. & ws-section
Reply with quote

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
View user's profile Send private message
vini_srcna

Active User


Joined: 26 May 2005
Posts: 178
Location: Copenhagen, Denmark

PostPosted: Wed Mar 21, 2007 6:54 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
No new posts Is possible to call subprogram from c... cmsmoon COBOL Programming 3 Fri Aug 05, 2016 6:46 pm
This topic is locked: you cannot edit posts or make replies. Stored procedure on Federated thru DB2 arif677 DB2 6 Tue May 31, 2016 11:48 pm
No new posts Mainframe COBOL - DB2 Stored Procedure Elixir DB2 2 Sat Mar 19, 2016 9:39 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us