I have a job control code in which I'm invoking another job. I attached the job to a handler and check if it was attached properly. Then I prepare the job.
DSprepare job was suppose to reset the job if it was in aborted state. It reset the job and also throw a warning message. This is a server job.
*=========================================================================================================================
* Attach the job
*========================================================================================================================
JobName="CMN_Check_Batch_Jbs.":pJOB_NAME
vHandle_Job = DSAttachJob(JobName, DSJ.ERRFATAL)
*=========================================================================================================================
* If the Attachment of Job Failed, it log the error message
*=========================================================================================================================
If NOT(vHandle_Job) Then
vReturnValue=-1
Call DSLogFatal("Job Attach Failed: CMN_Check_Batch_Jbs", "JobControl")
Abort
End
**********Reset the job if the attached job failed***********
vHandle_Job = DSPrepareJob(vHandle_Job)
This code gave the following warning.
Job CMN_Check_Batch_Jbs.PSF_Product_Extract_Mstr_SER_SSIL_Seq must be reset before it can run.
Is there any way to avoid this warning? And why is this happening?
DSPrepareJob ordering in a job control code
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 385
- Joined: Wed Jun 16, 2004 12:43 pm
- Location: Virginia, USA
- Contact:
Doesn't DSPrepareJob() return a status value? The code example is resetting the job handle which means the subsequent use of it will be invalid.
Chuck Smith
www.anotheritco.com
www.anotheritco.com
-
- Premium Member
- Posts: 385
- Joined: Wed Jun 16, 2004 12:43 pm
- Location: Virginia, USA
- Contact: