ALCOBJ on a Data area

240 pts.
Tags:
Allocate Object
AS400 Command
Data Area
Hi , 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 + Active|') GOTO CMDLBL(ENDE) ENDDO SBMJOB ... 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

Software/Hardware used:
AS400 COBOL
ASKED: March 18, 2013  12:07 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    The ALCOBJ needs to be part of the submitted job while it runs, not part of the job that runs SBMJOB. If the ALCOBJ fails, the submitted job should end itself. -- Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following