how can i determine if a batch is locked (ie it is in change mode) . Before i update the batch i would like to know if it is locked or not , so that i can wait till it is unlocked and then update