IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

cursor declaring


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
prasannanjaneya
Warnings : 1

New User


Joined: 14 Mar 2005
Posts: 10
Location: pune

PostPosted: Thu Sep 22, 2005 4:14 pm
Reply with quote

what is difference b/w declaring the cursor in data division and procedure division.
Back to top
View user's profile Send private message
nitin4.a

New User


Joined: 16 Aug 2005
Posts: 26

PostPosted: Thu Sep 22, 2005 6:51 pm
Reply with quote

Hi

There is no difference as such but according to good programing practice it should be declared in Data Division i.e working storage section

regds
Back to top
View user's profile Send private message
ikumar

New User


Joined: 02 Aug 2005
Posts: 81

PostPosted: Thu Sep 22, 2005 7:04 pm
Reply with quote

As per my knowledge, there is no difference in declaring the cursor in data division or procodure division. But you should be careful enough when you code cursor declaration in the procedure division. Make sure that the Cursor Declaration has been coded in the logic before any OPEN/FETCH/CLOSE statements.
Back to top
View user's profile Send private message
nitin4.a

New User


Joined: 16 Aug 2005
Posts: 26

PostPosted: Thu Sep 22, 2005 7:17 pm
Reply with quote

yes,

that is true
you should declare before using it in the code
thats it should be declared before
operated by open,fetch,lose commands


regads
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Is SQLCODE -811 possible while fetchi... DB2 1
No new posts Restart logic by using cursor name in... DB2 1
No new posts Seeking Resolution for SQKCODE -991 o... DB2 2
No new posts Multiple rows within Cursor when Coun... DB2 14
No new posts Dynamic cursor name in Cobol program COBOL Programming 1
Search our Forums:

Back to Top