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

Keep cursor Open in Subprgram..


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 275
Location: Mumbai

PostPosted: Wed Oct 14, 2009 1:47 pm
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: 275
Location: Mumbai

PostPosted: Wed Oct 14, 2009 2:52 pm
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

Moderator Emeritus


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

PostPosted: Wed Oct 14, 2009 7:34 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Calling an Open C library function in... CICS 1
No new posts Open VSAM File in IMS DC Region - DFS... IMS DB/DC 0
No new posts DFHCSDUP EXTRACT unable to open outpu... CICS 5
No new posts IGZ0035S THERE WAS AN UNSUCCESSFUL OP... COBOL Programming 3
No new posts Is SQLCODE -811 possible while fetchi... DB2 1
Search our Forums:

Back to Top