Hello If you do not want to use Java but you are invoking chcclp scripts from a batch file or shell script you have a couple of options
1) Break up your chcclp processing into 2 script
a) The first script unlocks the table. If it errors because the table is already unlocked it does not matter
b) The second script does the rest of the processing
2) More generally execute your chcclp script and check for any errors (scan string would be \[ERR in Linux/UNIX) Then you can code explicit recovery or user notification messages on detecting an error
------------------------------
Robert Philo
------------------------------