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: 183

Reply to This

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


Register Now IBM Data Tech Summit virtual event October 6th!

Started by Surekha in What's hot ? Sep 24. 0 Replies

Data Tech Summit Virtual Event - The Latest News on Enterprise Data & AIDate:  Tuesday, October 06, 2020Time: 11:00 AM Eastern Daylight TimeRegister NowBusiness cycles are…Continue

Introducing IBM Db2 for z/OS Developer Extension for Microsoft Visual Studio Code

Started by Calene Janacek in Application Development and DB2 Jul 30. 0 Replies

We are excited to announce that the first iteration of IBM Db2 for z/OS Developer Extension is available now as a free downloadable extension in the…Continue

© 2020   Created by Surekha Parekh.   Powered by

Badges  |  Report an Issue  |  Terms of Service