Portal | Manuals | 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

Senior Member


Joined: 21 Sep 2010
Posts: 2443
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
No new posts COBOL Developers Perspectives on Soft... achakarov COBOL Programming 4 Sat Jul 18, 2020 1:26 am
No new posts CALL statement in COBOL for VSE Kirthishine COBOL Programming 3 Fri Jun 26, 2020 12:12 pm
No new posts Seeking Resolution for SQKCODE -991 o... tgwacker50 DB2 2 Mon Jun 22, 2020 8:25 pm
No new posts Multiple rows within Cursor when Coun... iamdijkstra007 DB2 14 Mon Jun 08, 2020 12:53 am
No new posts Question for Cobol Report Writer jackzhang75 COBOL Programming 3 Wed May 27, 2020 4:35 am

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