db2 range partitioning attach and detach issue
Use this:

db2 +c "lock table tabname in share mode"
db2 +c "alter table tabname add partition &lt;partname&gt; starting 'date' ending 'date' exclusive"
db2 "commit"


Here is the explanation: 

+c : disable auto commit, so the command you send will not be committed until an explicit commit command sent or connection closed. 

locking table in share mode: means that you want to acquire a shared lock which will prevent other transactions to make changes to the table. So, following command won't be blocked while working. 

In this approach you say that: lock the table for me, then issue partition command, while issuing this command other transaction will wait till you finished your job and send commit statement.

I am not sure if it works or not. But it worth a try.