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: 3051
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top