Gen TIRORA.pc user exit usage for retry logic
search cancel

Gen TIRORA.pc user exit usage for retry logic

book

Article ID: 251847

calendar_today

Updated On:

Products

Gen Gen - Host Encyclopedia Gen - Run Time Distributed Gen - Workstation Toolset

Issue/Introduction

Have requirement to perform retry logic on specific SQL return codes from Oracle and want to implement in TIRORA.pc code. 

Questions:

  1.  Where do you perform the retry?
  2.  What is the program that calls TIRORA to fetch the retry flag?

 

Environment

Release : 8.6

Resolution

Question 1: We want to check to see where the changes to TIRORA.pc are done?
You only need to add the SQL return codes that would trigger a retry to the 'check_retry' function in TIRORA.pc.  Calling check_retry from other sections (i.e.chkoerr) won't fire off a retry.   

Note - Gen runtimes are assuming ANSI SQL return codes and not Oracle return codes.    

Question 2: What is the program that calls TIRORA to fetch the retry flag?
The check_retry function is called by our runtimes when an error occurs to determine if the SQLCODE is valid for a retry. That's why we allow customers to add SQLCODES that would trigger a retry.  The check_retry is used by our runtimes after the transaction is completed and there was a database error.