Automic Workload Automation

  • 1.  Create a list of failed jobs

    Posted Sep 05, 2018 10:21 AM

    Dear Community,

     

    I looking for way to get a list of jobs that have ended with a status code other than ANY_OK (that means jobs that have ended with a system return outside the range 1900-1999).

    Not jobs that are currently failed, I can get that from the activity Window, but jobs that at some point have ended NOT OK, e.g. within the last 24 hours.

     

    Is anyone able to help me with that ?

     

    /Keld.



  • 2.  Re: Create a list of failed jobs

    Posted Sep 05, 2018 10:30 AM

    A few questions for you so that I/we can reply properly...

    • Are you looking for a SQL query to identify these tasks, or just a way to find this through the AWI?
    • If going the SQL route (including SEC_SQLI vars):
      • are you looking to exclude failed jobs that are still showing up on the activities screen?
      • are you looking to filter for jobs (JOBS) only, or other object types as well (e.g., SCRI, JOBF, etc)?


  • 3.  Re: Create a list of failed jobs

    Posted Sep 05, 2018 11:00 AM

    An SQL would be very fine.

    Failed jobs from the Activity window is OK.

    the list should show all executable objects, JOBS, JOBF, SCRI etc...



  • 4.  Re: Create a list of failed jobs

    Posted Sep 05, 2018 11:13 AM

    Try this one on for size:

    select ah_name as object,
         ah_idnr as run_nr,
         ah_status as status,
         ah_timestamp1 as activation,
         ah_timestamp2 as start,
         ah_timestamp3 as post_proc,
         ah_timestamp4 as end
    from ah
    where ah_otype in ('JOBS','JOBF','SCRI')
    and ah_status not between 1900 and 1999
    and ah_timestamp2 > current_timestamp - 1 day
    and ah_client=100
    and ah_timestamp4 is not null;

    Notes:

    • lines 4-7 -- these times will be displayed in GMT.  You may need to adjust those to reflect your current timezone if needed.
    • line 9 -- add or remove any other object types from the list as needed
    • line 11 -- may need to adjust the syntax based on your DB.  (The above code works for DB2.)  
    • line 12 -- update this to reflect the client you're trying to query


  • 5.  Re: Create a list of failed jobs

    Posted Oct 12, 2018 03:09 PM

    HI Keld_Mollnitz,

     

    Was the information provided by Daryl helpful in answering your questions? If so, please help by using the "Mark Correct" on the comment that answered/help you resolved your question.  Or if you are still looking for assistance on the topic please also let us know.



  • 6.  Re: Create a list of failed jobs

    Posted Oct 23, 2018 03:18 PM

    I downloaded to the community a series of jobs to track status that might help.

    AWI JOB STATUS Report