I have one program which starts a job , I do ALCOBJ on a dataarea so that if the job is already running and someone tries to start the job again i can show the error that job is running
ALCOBJ OBJ((&LIBLDTAQ/&DTAAA *DTAARA *EXCL)) WAIT(0)
MONMSG MSGID(CPF1002) EXEC(DO)
SNDPGMMSG MSG('Mikaodo Job Schedular is Already +
Scope of the alocation is till job only .
The problem is this dosent works ,
1.) if the job is already running and i again call this program , i do not get the error ,and the job gets submitted ,
2.) When the job ends alocation is not released , meaning , if i run again this program from my id i do not get error , but some user with another id tries to do so he gets a error that job already running
3. when i check the dataarea object , i do not see that it is in use , but another user sees that it is in use .
Please let me know where the problem is , is it somethign to consider while creating the Dataarea , or i need to change something suring SBMJOB