Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Keep cursor Open in Subprgram..

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 271
Location: Mumbai

PostPosted: Wed Oct 14, 2009 1:47 pm    Post subject: Keep cursor Open in Subprgram..
Reply with quote

Hi All,

My requirement is as below

1. Call a subprogram,open a cursor and fetch around 100 records from a table and write them in an Output file and then go back to main program

2. After performing logic in main program call the sub program again and start fetching table record from 101st record ands write them in same output file till end of cursor and then close the cursor

My doubts are as below:

1. Once I open the cursor will it remain open when I go back to the main program 1st time?

2. If cursor does not remain open can anyone please guide me how to process logic mentioned above?

Thanks in advance,

Regards,
Chandan
Back to top
View user's profile Send private message

chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 271
Location: Mumbai

PostPosted: Wed Oct 14, 2009 2:52 pm    Post subject: Reply to: Keep cursor Open in Subprgram..
Reply with quote

Hi Guys,

After posting this posting I ram a sample program taking scenarios mentioned in program and its working fine we can have the cursor open and come back to main program and then again fetch from next record second time..

My apology for inconvenience

Regards,
Chandan
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Oct 14, 2009 7:34 pm    Post subject: Reply to: Keep cursor Open in Subprgram..
Reply with quote

Hello,

Quote:
My apology for inconvenience
If this was the very worst thing to happen this week, it would be a very good week icon_smile.gif

Thank you for posting your finding. It will help someone else one day icon_wink.gif

d
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Rexx command to open an another text ... Bharath Vikraman PC Guides & IT News 7 Sat May 12, 2018 4:34 pm
No new posts -502 Error - Cursor already open anand jeyapaul DB2 7 Sun Oct 29, 2017 4:22 am
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Reply MQ open error Vignesh Sid COBOL Programming 6 Thu Sep 07, 2017 6:02 pm
No new posts Testing rerad cursor for status with ... John F Dutcher DB2 8 Fri May 19, 2017 9:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us