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

Restart logic by using cursor name in cobol db2


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Twinkle22

New User


Joined: 31 Jan 2020
Posts: 4
Location: India

PostPosted: Wed Jul 29, 2020 11:26 am
Reply with quote

Hi,

I have a cobol db2 program and have used 2 cursors. I want to implement restart logic using the cursor name. How to get the cursor name in the restart-key?

Declare First_csr cursor

Declare second_csr_cursor

Now if restart-ind=Y, how do i obtain the cursor name from the restart area?
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2727
Location: NYC,USA

PostPosted: Wed Jul 29, 2020 8:27 pm
Reply with quote

Hope you realize, If something fails then everything should rollback and upon RESTART, it should process in the same sequence as it did before the fail. So I am not sure why even do you care to save the cursor name and helps you during the RESTART?

For the original question use CURSOR_NAME use GET DIAGNOSTICS.
www.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/sqlref/src/tpc/db2z_sql_getdiagnostics.html
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 JSON PARSE in Enterprise COBOL COBOL Programming 2
No new posts Cobol code- to find a string in a str... COBOL Programming 3
No new posts regarding COBOL WRITE verb (VB File H... COBOL Programming 6
No new posts COBOL Table data to a flat file with ... COBOL Programming 8
No new posts Read UTF-8 file in Cobol COBOL Programming 5
Search our Forums:

Back to Top