DB2 LUW alternative for z/OS skip locked row option


I need help for the following issue I have : 

A table contains records with a STATUS column. This status is either 'TO BE PROCESSED' or 'PROCESSED'. New records with status 'TO BE PROCESSED' are added continuously into this table.

Now we want to develop an application that regularly looks to see if there are records to be processed and this application should run in parallel so the speed up the processing of these records.

Put in other words : the first connection looks for records using following query :

select col1,col2 from table where STATUS_CODE = 'TO BE PROCESSED' fetch first 20 rows for update of STATUS_CODE.

The intention is that this first connection selects 20 records to be processed and then subsequently processes them. In the meantime, other parallel connections should select and process another set of 20 records and so on.

The issue we encounter is that the parallel connections are locking each other ans so, do not run in parallel.

I read about the SKIP LOCKED ROW option that exists in DB2 z/OS but we run DB2 LUW v10.5 , with CUR_COMMIT enabled and the SKIP LOCKED ROW option does not exist in LUW

Any suggestions on how to simulate this SKIP LOCKED ROW behaviour on DB2 LUW ?

Best regards


Views: 99

Reply to This

Bringing Db2 enthusiasts together virtually. Expert or novice, distributed or mainframe, this is the place for everything DB2.


Db2 Analytics Accelerator Version 7.5 is now Generally Available!

Started by Patricia Zakhar in What's hot ? on Monday. 0 Replies

Now Generally AvailableIBM Db2 Analytics Accelerator Version 7.5! The latest version of the Db2 Analytics Accelerator, which delivers the highly anticipated Integrated Synchronization capability, is now generally available. The Db2 Analytics…Continue

Db2 for z/OS Master class with John Campbell and the SWAT team returns!

Started by Surekha Parekh in What's hot ?. Last reply by carol Goldberg Nov 7. 1 Reply

Db2 for z/OS Master class with John Campbell and the SWAT team returns! June 24-28, 2019 at IBM Hursley near Winchester, UKSeptember 23-27, 2019 at IBM Silicon Valley Lab in San Jose, California…Continue

Tags: Events, MasterClass, JohnCampbell

© 2019   Created by Surekha Parekh.   Powered by

Badges  |  Report an Issue  |  Terms of Service