search cancel

Deadlock priority for an IDMS task

book

Article ID: 229179

calendar_today

Updated On:

Products

IDMS IDMS - Database

Issue/Introduction

If two tasks are in a deadlock situation, can one task have a higher priority so that the other lower priority task will abend first?

 

Environment

Release : All

Component : IDMS/DB

Resolution

By default IDMS resolves the deadlock by forcing the most recent run unit to be rolled back, unless the task selected has a higher priority than the other task.
So if two different task codes are in a deadlock situation you can give priority to one task code by increasing it's priority in the task definition. The default task priority is 100.
To increase the priority of a task modify it in the SYSGEN. For example to give task1 priority:

MOD SYS 200.
MOD TASK task1 PRIORITY IS 110.
GEN.

Alternatively you can code a user exit 30, the deadlock victim selection exit  which allows victims to be selected based upon your specific requirements.

Additional Information

See documentation section How the System Detects a Deadlock which explains how IDMS selects the task to cancel. And section Numbered Exits for information on Exit 30 Deadlock Victim Selection Exit