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

Reply to This

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

User Groups

Blog Posts

IDUG NA 2019 in Charlotte: RUG Leaders Luncheon on Tue, 4th, June.

Posted by Manuel Gomez Burriel on May 30, 2019 at 7:23 1 Comment

IDUG are pleased to once again invite all Db2 Regional User Group (RUG) leaders attending the IDUG conference in Charlotte to join us for a RUG Leaders Luncheon on Tuesday, June 4,…



  • Add Videos
  • View All

IDUG Conference News

© 2019   Created by Surekha Parekh.   Powered by

Badges  |  Report an Issue  |  Terms of Service