Loading ...
Sorry, an error occurred while loading the content.

Creating E/CS Job List for Schedulers

Expand Messages
  • respahn2000
    Hello everyone! I am currently working with an individual that hopefully will write me a script that can pull information from the ctmpsm utility. What I want
    Message 1 of 3 , Apr 1, 2002
    • 0 Attachment
      Hello everyone!

      I am currently working with an individual that hopefully will write
      me a script that can pull information from the ctmpsm utility.

      What I want is a program that will access ctmpsm and pull a table
      name and the member names that exist under that table name... and
      format it to be "pretty" for the Schedulers use.

      I currently do cut & pastes into a DB document and rely on the
      Schedulers to insert a job into this DB when they set up new
      definitions. Needless to say, it's not very accurate.

      So, does anyone know where the table and job information is populated
      to? I suppose it must go to some kind of log each day at NEWDAY,
      doesn't it? ??? My co-worker did not want to work with any menus
      that ctmpsm brings up, but wanted to know what processes ctmpsm goes
      through to get to the information we are trying to pull (Table name
      and Jobnames w/n table)

      Any help would be greatly appreciated. I thought I'd try you guys
      before calling support.

      Regards.
      Rebekah Spahn
      Hewitt Associates LLC
    • Chris Cunningham
      If I read your requirement correctly, it should just be a matter of some simple sql like the following : echo select JOBNAME, SCHEDTAB from CMS_JOBDEF go |
      Message 2 of 3 , Apr 1, 2002
      • 0 Attachment
        If I read your requirement correctly, it should just be a matter of some
        simple sql like the following :

        echo "
        select JOBNAME, SCHEDTAB from CMS_JOBDEF
        go
        " | SQL >${HOME}/utility/data/jobname_list
        #
        exit

        Run as controlm user. Obviously this could be refined to, for example,
        cross-ref with CMS_SCHEDT to ensure only jobs / tables with specified
        userdaily names are passed, or cross-ref with CMS_CTL_J or CMS_QR_J to
        provide more specific info like which jobs/tables use a certain resource,
        etc.
        In terms of formatting, I leave that to your script guru to use awk / nawk
        or similar utilities to prettify the info.

        One thing you may want to consider is doing the same sort of extraction but
        at the ECS level - since coding is usually performed through ECS. You run
        the risk, since info is stored in Control-M, that some tables status in ECS
        is not identical to that in actual CTM data centre, but if your change
        control is strong and uploads are all in synch, then at least you only have
        to run one extraction instead of one per data centre. Relevant sql would be
        something like
        select A.Job_Name, B.Sched_Table, B.Data_Center from def_job A, def_tables
        B where A.Table_id = B.Table_id order by B.Data_Center, B.Sched_Table,
        A.Job_Name

        Note that this is for defined, not active jobs. Not sure you can actually
        establish source table name for a job once it is in the active plan -
        unless you establish a convention like APPLGROUP == table name or similar
        which we try to do for this reason. Also we try and keep memname and
        jobname in synch since jobname isn't always defined for (for example) MVS
        jobs.

        Regards,

        Chris Cunningham,
        IBM-GSA
        Ph. 61 - 2 - 9878-9881
        ccunning@...




        "respahn2000"
        <respahn@hewitt.c To: Control-X@yahoogroups.com
        om> cc:
        Subject: [Control-X] Creating E/CS Job List for Schedulers
        02/04/2002 04:01
        Please respond to
        Control-X





        Hello everyone!

        I am currently working with an individual that hopefully will write
        me a script that can pull information from the ctmpsm utility.

        What I want is a program that will access ctmpsm and pull a table
        name and the member names that exist under that table name... and
        format it to be "pretty" for the Schedulers use.

        I currently do cut & pastes into a DB document and rely on the
        Schedulers to insert a job into this DB when they set up new
        definitions. Needless to say, it's not very accurate.

        So, does anyone know where the table and job information is populated
        to? I suppose it must go to some kind of log each day at NEWDAY,
        doesn't it? ??? My co-worker did not want to work with any menus
        that ctmpsm brings up, but wanted to know what processes ctmpsm goes
        through to get to the information we are trying to pull (Table name
        and Jobnames w/n table)

        Any help would be greatly appreciated. I thought I'd try you guys
        before calling support.

        Regards.
        Rebekah Spahn
        Hewitt Associates LLC







        Control-X email list does not tolerate spam. For more information
        http://s390.8m.com/controlm.html DO NOT Spam this list or any members. To
        unsubscribe go to http://groups.yahoo.com/group/Control-X and click on User
        Center. Not affiliated with BMC Software.

        Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
      • pezzi169
        The best way to achieve this kind of list is to use the direct SQL statements, or if using ECS 600, use the reporting facility. The SQL to use would be along
        Message 3 of 3 , Apr 30, 2002
        • 0 Attachment
          The best way to achieve this kind of list is to use the direct SQL
          statements, or if using ECS 600, use the reporting facility.

          The SQL to use would be along the lines of;


          select JOBNAME, SCHEDTAB from CMS_JOBDEF
          go

          SQL can be access from CTM_MENU, Troubleshooting, Interactive
          Commands, or from a command line, you could use

          sql << EOF > output.file.name
          select JOBNAME, SCHEDTAB from CMS_JOBDEF
          go
          EOF

          This will produce a basic list of jobs and their scheduling tables.
          There are many other fields that can be listed upon, some of the
          usually more useful are;

          MEMNAME - Member name
          MEMLIB - script library
          DESCRIPT - Job description
          NODEGRP - Agent that will run the job
          OWNER - Userid that the job runs as
          TASKTYPE - Is it a JOB or COMMAND
          CMDLINE - command line of the jo

          With sql, there are many other "commands" that can be used such as;
          ORDERBY - Sort order
          WHERE - Selective statement - select a, where x=y

          I would suggest searching the internet for SQL command reference
          manuals.

          Hope this is useful,
          Andy
        Your message has been successfully submitted and would be delivered to recipients shortly.