We have multiple users to run following script:
{add a batch activity record so that this doesn't get run twice}
set 'D_Batch Source' of table S_Batch_Activity_MSTR to "JTETRX";
set 'D_Batch #' of table S_Batch_Activity_MSTR to "JTETRX";
set 'D_User ID' of table S_Batch_Activity_MSTR to "PCONS";
change table S_Batch_Activity_MSTR;
save table S_Batch_Activity_MSTR;
.......
{Copy this code below below to clear the error}
set 'D_Batch Source' of table S_Batch_Activity_MSTR to "JTETRX";
set 'D_Batch #' of table S_Batch_Activity_MSTR to "JTETRX";
set 'D_User ID' of table S_Batch_Activity_MSTR to "PCONS";
change table S_Batch_Activity_MSTR;
remove table S_Batch_Activity_MSTR;
warning "Process Completed";
In this script, we have "save" " remove" record on table S_Batch_Activity_MSTR. this script is in client side not in server side. How can we lock this table while one user running script, and do not let other running it?
*This post is locked for comments