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
 

 

To use the Cursor in Sub Program, Declaration needed or not

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

New User


Joined: 13 Jun 2005
Posts: 24

PostPosted: Thu Nov 24, 2005 11:01 pm    Post subject: To use the Cursor in Sub Program, Declaration needed or not
Reply with quote

hi,
i've declared a cursor c1 in main pgm without WITH HOLD option.so, to do certain operations in sub pgm do i have to declare c1 cursor again or else i have to declare it with new name.
warm regards,
shammi.
Back to top
View user's profile Send private message

khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Mon Nov 28, 2005 3:22 pm    Post subject: Cursor
Reply with quote

Hi frnd,
use WITH HOLD option it is usefull in ur case. but if u don't want that. then u need to declar again in the sub program only.
Back to top
View user's profile Send private message
Suryanarayana.tadala

New User


Joined: 03 Nov 2005
Posts: 43
Location: St.Louis

PostPosted: Mon Nov 28, 2005 9:16 pm    Post subject:
Reply with quote

Frend's i feel that u need to declare the cursor once again in the subprog as u will be accessing the data in the subprog too... the with hold option helps you to retain the cursor state in the trxn flow.

correct me if i am wrong..
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 Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts Updating Cursor row withour using FOR... chandan.inst DB2 15 Tue Nov 08, 2016 11:17 am


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