Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Restart logic by using cursor name in cobol db2

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
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    Post subject: Restart logic by using cursor name in cobol db2
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: 2487
Location: NY,USA

PostPosted: Wed Jul 29, 2020 8:27 pm    Post subject:
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.
https://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    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Missing Negative sign in COBOL jzhardy COBOL Programming 6 Sat Sep 26, 2020 11:32 am
No new posts COBOL reading from SYSIN jzhardy COBOL Programming 1 Mon Sep 21, 2020 2:37 pm
No new posts how to read accounting information in... jzhardy COBOL Programming 1 Mon Sep 21, 2020 9:57 am
No new posts Sync logic between VSAM files and DB2... murali.andaluri COBOL Programming 9 Tue Aug 25, 2020 1:01 pm
No new posts NOT IN clause in COBOL pgm mramvivek COBOL Programming 8 Thu Aug 20, 2020 4:48 am

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