6 Replies Latest reply on Dec 3, 2019 12:25 AM by Mahendra Vakati

    Cyclic job issue

      Share This:

      Hi Team


      i have defined a jobwith following steps

      In Steps On-->OK



      but when i execute a job the job is getting failed but in sysout i can see the expected job output(which shows job has executed successfully).

      Job logs reads as


      8/11/2010 5:41:01 PM   CS5065                 ORDERED JOB:28; DAILY FORCED, ODATE 20100811
      8/11/2010 5:41:01 PM   SL5105                 SUBMITTED TO WIN-C5F8WLM5ULJ
      8/11/2010 5:41:02 PM   TR5101                 STARTED AT 20100811174101 ON WIN-C5F8WLM5ULJ
      8/11/2010 5:41:02 PM   TR5120                 JOB STATE CHANGED TO Executing
      8/11/2010 5:41:03 PM   TR5100                 ENDED AT 20100811174103. OSCOMPSTAT 0. RUNCNT 1
      8/11/2010 5:41:03 PM   TR5132                 STATUS SET TO NOTOK AS A RESULT OF DO RERUN
      8/11/2010 5:41:03 PM   TR5134                 ENDED NOTOK

      8/11/2010 5:41:03 PM   TR5120                 JOB STATE CHANGED TO Analyzed
      8/11/2010 5:41:04 PM   SL5215                 ALL RERUNS HAVE BEEN PERFORMED. MAXRERUN = 0
      8/11/2010 5:41:04 PM   SL5120                 JOB STATE CHANGED TO Post processed


      Is thr any other way to define cyclic job?

      why job is showing failed status even though job has actually executed?

        • 1. Re: Cyclic job issue




          Ideally you should not design a job to rerun if it completes successful, since it will continue running until it reaches max rerun limit or run until time.

          Control-M does not allow rerunning unless it is set to failed state. Since you set the job to rerun up on successful completion system will set the job to failed state and then rerun. Now you have max rerun set to 0. Hence it will not try rerunning the job and the job remains in failed state. This is the reason why your job remains failed

          I am not sure what your design requirement is but you can try changing max rerun value to something higher than 0

          Hope this helps you.

          • 2. Re: Cyclic job issue

            Hi sheencr,


            My requirement is "Job is to be rerun even if its completed successfully and should be stopped if it gets failed".


            and do you know why CONTROL-M does not support rerun on job which is completed successfully?

            I have configured email notification on job failure.due to this behavior of CONTROL-M I m getting false notification on mail even though job has ended successfully


            waiting for your reply

            • 3. Re: Cyclic job issue

              Logically it is right; you wouldn’t require rerunning a scheduled job if it is completed successfully. However I don’t know what is the exact reason why BMC made it like that. Also I need to check if this is same in the latest versions.

              Based on your requirement I would design such a way that the cyclic job runs every minutes or less with From option as “Start” so that the jobs continuously runs. You can also have do stop cyclic if it fails.

              • 4. Re: Cyclic job issue

                Hi Sheencr,


                That means

                1. when we use Do->Rerun option, regardless of job execution status.CONTROL-M will put NOTOK status to the job.

                2. If we have to do rerun then we have to use cyclic job option and set maximum rerun parameter value and put ON-->NOTOK | Do-Stop cyclic


                Thanks for your help.

                • 5. Re: Cyclic job issue

                  That is what my experience teaches me. Glad to know that helped.



                  • 6. Re: Cyclic job issue
                    Mahendra Vakati

                    After 5 years of your query BMC had given the cause of it and after 4 years of their justification am replying with that.




                    The Control-M automatic rerun process functions as follows:


                    1. Control-M determines that automatic rerun is possible only if the job ENDS NOTOK and a specified DO RERUN statement is activated during post-processing. If the monitor determines that automatic rerun is possible, it sets the status of the  job to ENDED NOTOK – RERUN NEEDED.
                    2. The monitor then checks the value  of MAXRERUN in the Active environment. If the value is zero, automatic rerun is  not possible and the job is not submitted for rerun. If the value is greater  than zero, rerun is possible and the monitor submits the job for rerun when all  runtime criteria are satisfied.
                    3. The JCL for the rerun job is taken  from the member specified in the RERUNMEM parameter. If no RERUNMEM value is specified, the JCL for the rerun is taken from the regular JCL member of the job that is specified in the MEMNAME parameter.  MAXRERUN applies only to automatic reruns. The MAXRERUN counter is not affected by reruns performed manually using the Rerun option in the Control-M for z/OS Active Environment screen. If a job
                      is defined as cyclic, the MAXRERUN parameter can be used to specify the number of iterations. This number excludes the initial run of the job.
                    1 of 1 people found this helpful