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

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


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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: 677
Location: NJ

PostPosted: Mon Nov 28, 2005 3:22 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top