IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

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: 2508
Location: NY,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.
Use [URL] BBCode for Links
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

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts COBOL Performance Tuning COBOL Programming 6
No new posts JCL for replacing code in Cobol JCL & VSAM 8
No new posts COBOL VS SORT Utility for file format... COBOL Programming 6
No new posts XML Parsing in COBOL creating "h... COBOL Programming 0
No new posts Calling Rexx program from Cobol CLIST & REXX 12

Back to Top