4 Replies Latest reply on Feb 7, 2019 3:17 PM by Adriano Gomes

    scan database for jobs with "Run as Dummy" flagged

    Tom Bruylandt

      Hi,

      I would like to scan the Control-M/database for jobs where option "Run as Dummy" set to yes (flagged).

      Can someone tell me where this info is stored on db ?

       

       

      So I want the jobs "Run as Dummy", not the jobs with Task DUMMY

       

      Thanks Tom

        • 1. Re: scan database for jobs with "Run as Dummy" flagged
          Adriano Gomes

          Hi Tom Bruylandt

           

          This is a very trick question!

          Indeed when looking at CTM Data model, there is no such difference for CTM open systems job instances (Non OS/390). A "DUMMY" Job/Task and a regular OS JOB/Task marked "Run as Dummy" will be represented the same way. acctually, if you have a regular job(Job/Command) and check the "Run as Dummy", the CTM EM internal mechanism will change the task_type to 'Dummy'.

           

          • For open systems jobs, in order to find them at CTM EM DB look for the task_type='Dummy'.
          • For OS/390, it is completely different. Look for mem_lib='DUMMY'

           

          this sample sql query should list both DS and MF Systems. You may be able to list on the Report Facility by selecting Filters.

           

           

          select

          def_ver_tables.data_center

          ,def_ver_tables.sched_table

          ,def_ver_job.cmd_line

          ,def_ver_job.group_name

          ,def_ver_job.application

          ,def_ver_job.task_type

          ,def_ver_job.mem_lib

          ,def_ver_job.memname

          ,def_ver_job.owner

          ,def_ver_job.job_name

          ,split_part(lower(def_ver_job.node_id), '.', 1) as node_id

           

          from

          def_ver_job

          ,def_ver_tables

          where

           

          def_ver_job.table_id=def_ver_tables.table_id

          and def_ver_job.is_current_version='Y' -- Job Last Version

          and (def_ver_job.task_type='Dummy' or def_ver_job.mem_lib='DUMMY')

           

          order by data_center

           

          Hope that it Helps you.

           

          A>Gomes

          2 of 2 people found this helpful
          • 2. Re: scan database for jobs with "Run as Dummy" flagged
            Bhanu Badiginchala

            Depends on all the types of jobs in the DB.

            Not sure if there is a single column that indicates this.

            OS jobs converted to Dummy have MEMLIB/MEMPATH value populated.

            MFT jobs have APPL_TYPE set to FILE_TRANS even if its run as dummy.

             

            Not sure how it would behave if a job type is converted to Dummy instead of just ticking the run as dummy - it might still hold some of the values.

            1 of 1 people found this helpful
            • 3. Re: scan database for jobs with "Run as Dummy" flagged
              Steven Franckaert

              Check with:

              SELECT JOB_NAME,b.* 

              FROM ECS.DEF_JOB a, ECS.DEF_SETVAR b 

              WHERE

              (a.TABLE_ID = b.TABLE_ID and a.JOB_ID=b.JOB_ID) and  
              b.NAME LIKE '%%$BMCWAIORIGTYPE'

              2 of 2 people found this helpful
              • 4. Re: scan database for jobs with "Run as Dummy" flagged
                Adriano Gomes

                Hi Tom Bruylandt

                 

                be aware that sql query you have chosen from Steven Franckaert will not  retrieve "only" jobs with "Run as Dummy" Checked but all jobs that had the "Run As Dummy" checked/uncheck once. Just take a carefull look.

                 

                AFAIK, the %%$BMCWAIORIGTYPE will keep the previous/original task type for the task_type field on CTM EM DB when such Job  is checked  "Run as Dummy", so CTM can restore the task_type back when it is unchecked.

                 

                My best rgds

                 

                A>Gomes

                2 of 2 people found this helpful