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 Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm
No new posts pre-compiler for program in an HFS Pedro DB2 0 Fri Jun 23, 2017 11:13 pm
No new posts Compiling program in endeavor for tra... RALAKKAL Compuware & Other Tools 4 Mon Jun 05, 2017 8:27 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm


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