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
 

 

cursor declaring

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: cursor declaring
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    Post subject: Re: cursor declaring
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    Post subject: Re: cursor declaring
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    Post subject: Re: cursor declaring
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    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 Getting -504 Cursor Name GTT-ARTS-CUR... Robin Sulsona DB2 2 Fri Mar 17, 2017 1:43 am
No new posts Release of Adabas Cursor mohitsethi All Other Mainframe Topics 1 Mon Feb 06, 2017 8:36 pm
No new posts Updating Cursor row withour using FOR... chandan.inst DB2 15 Tue Nov 08, 2016 11:17 am
No new posts Variable for cursor names ravikumar15 DB2 5 Sun Jul 17, 2016 7:08 am
No new posts DB2 Stored Procedure - Dynamic SQL - ... GuyC DB2 2 Wed Feb 17, 2016 5:10 pm


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