5 Replies Latest reply on Oct 15, 2019 12:26 PM by Adriano Gomes

    Control of active jobs in AJF - Control-M for z/OS

    Pavel Grund
      Share This:

      Hello all,

       

      I have a question about AJF in Control-M. My object is to getting the list of jobs from AJF, which are in wait schedule status.

      U would like to run a batch job, which will make a list of these jobs and notify operators, if there are some with "Wait Schedule".

      This job will be ordered  every day just several minutes before NEW DAY processing. It should notify the operator to check out

      AJF file and control the jobs with the wait schedule status.

       

      I have just one idea. I can use the utility CTMRFLW to list jobs in AJF. With some sort I can figure out which jobs are in "wait schedule"

      status.

       

      Does anyone have some better tips and ideas how to solve this object?

      Thank you very much

       

      Regards

      Pavel

        • 1. Re: Control of active jobs in AJF - Control-M for z/OS
          Bhanu Prakash Badiginchala

          Why not just create a new viewpoint to show all the jobs in waiting status. Operators can check that viewpoint at a specified time everyday instead of relying on a list created by a job. Also, the status of the job might have changed after the list is generated or new jobs could be in waiting state after the list is generated. Whereas, a viewpoint will always show the latest jobs in waiting status.

           

           

          Thanks,

          Bhanu

          3 of 3 people found this helpful
          • 2. Re: Control of active jobs in AJF - Control-M for z/OS
            Adriano Gomes

            Hi Pavel Grund

             

            For a batch/script  you can exploit CTM AAPI on top of CTM Enterprise Manager that will provide you an output pretty much the same as the Viewpoint mentioned bay Bhanu Prakash Badiginchala and with a simple script and can do like listing jobs in wait status with a desired filter and query about waiting info.

             

            With this cmd line you can list ALL jobs by STATUS con ALL CTMs DC's and you can tweek the filter to address your needs.

             

            ctm run jobs:status::get -s "ctm=*&status=Ended not OK, Wait User, Wait Resource, Wait Host, Wait Workload, Wait Condition, Status Unknown" -e <ENV>

             

            with the List produced by ctm run jobs:status::get you can extract jobId and trigger ctm run job::waitingInfo "$jobId"  -e <ENV>

             

            My Best

             

            A>Gomes

            3 of 3 people found this helpful
            • 3. Re: Control of active jobs in AJF - Control-M for z/OS
              Pavel Grund

              Hello Bhanu,

               

              Thank you for your tip for displaying SCREEN FILTER (view point) with selecting jobs in waiting status. I wanted to run a job at a specific time and automate this procedure. Operators may forget to make a control even there is no log about this event.

               

              Anyway, this is a good point to use screen filetr for this action.

               

              Regards

              Pavel

              • 4. Re: Control of active jobs in AJF - Control-M for z/OS
                Pavel Grund

                Hello Adriano,

                 

                thank you for your answer. Unfortuntelly, we do not use Enterprise Manager. We have only installed Control-M for z/OS and run a batch jobs at most.

                I we got the solution with utility CTMFLOW, which gives you the list of whatever you want form AJF.

                 

                Best regards

                 

                Pavel

                2 of 2 people found this helpful
                • 5. Re: Control of active jobs in AJF - Control-M for z/OS
                  Adriano Gomes

                  Hi Pavel

                   

                  Two more comments to this : I just found out with a Zos Best Friend:

                   

                  1) You can look for  REPJOBST on IOA.SAMPLE and run the report where you can tweek for screen 3 job statuses selection

                  2)  There is available on Zos the CTMAPI where you can perform SEARCH selection_criteria [selection_criteria]…

                   

                  When called from a batch job or step or from a REXX or CLIST, a statement in the format

                  EXEC CTMAPI PARM=‘SEARCH variable’

                   

                  The following statement is an example of the standard method of executing CTMAPI in batch job and passing it a SEARCH request:

                  //DAAPI DD *

                  SEARCH MEM=DEFSCHD1 JOB=JOBA OID=0AS45 ODATE=090601

                   

                  The full syntax for the selection criteria is as follows:

                  [IF] {[MEM=memname*] | [GROUP|GRP=group_name*] | [TABLE|TBL=table_name*] |

                  [JOB=job_name*] | [JOBID=jes_job_number] |

                  [OWNER=owner*] | [OID=orderid] | [ODATE={ODAT|date}] |

                  [RECTYPE={JOB|TAB|ALL}] |

                  [STATUS={WAIT_SCH | WAIT_CONF | WAIT_PIPE | WAIT_ORD | EXEC_ERR | EXEC_WSUB | EXEC_INQ |

                  EXEC_NJE | END_OK | END_OK_FOK | END_NOK_ABND | END_NOK_JCLE | END_NOK_UNKW | END_NOK_CC

                  | END_NOK_NSUB | END_NOK_DISA | ENDED | NOT_ENDED | EXIST | NOTEXIST | NOT_DELETED | DEL}

                  ] |

                  [STATE={HOLD|FREE}]}

                  [{AND|OR} selection2 }]...

                   

                  My Best

                   

                  A>Gomes

                  1 of 1 people found this helpful