jbase

Correct way to handle errors in Temenos T24 version AUTH.ROUTINE


I am writing Temenos T24 VERSION (input screen) authorisation routine (AUTH.ROUTINE) to do some processing and I need authorisation to stop in case of error. Here is how I have written the error handling:

AF=1; AV=1; AS=1
ETEXT = "Some error message"
CALL STORE.END.ERROR
MESSAGE = "ERROR"

Such error handling displays the error message in field 1, multi-value 1, sub-value 1, and does not allow to continue. However the changes to the record itself are already committed to the database.

What is the correct way to stop authorisation in version AUTH.ROUTINE ?


Solution

  • First thing to perform any check of the field level then better to use Validation Rtn as it will be call before authorize routine is triggered.

    Now i come to your issue why it updates the field values even when it throws error is because Authroise routine gets executed after F.WRITE is being performed to the file in order to avoid such situation you need to write BeforeAuth routine as it will also get trigger at Authorise stage but before F.Write is being executed so your purpose will be served i.e in case of error data wont be updated in the table.