TAA Tools

 PRTJOBQTIM      PRINT JOB QUEUE TIME                   TAAACGF

 The Print  Job Queue  Time tool  provides assistance  in answering  the
 question 'How much  time is spent by batch jobs  on a job queue waiting
 to  go active?'  You must be  using the TAA  Job Accounting  tool.  The
 CVTJOBQTIM command  is used first  to select  records from the  JOBACGP
 file  and create  the JOBQTIMP  outfile.   The  PRTJOBQTIM command  may
 then  be  used  to print  a  listing with  various  selection  and sort
 criteria.

 The JOBQTIMP file  is created  using a  model file of  TAAACGFP with  a
 format  name of  JOBQTIMR.   You  may analyze  the  JOBQTIMP file  with
 PRTJOBQTIM, a query, or your own program.

 Because the  system does not provide complete  information (such as the
 job queue name  where the job  was started from in  the job  accounting
 data), the  output is  less than  desirable.   However, you  can get  a
 reasonable  idea and  be able  to address  specific questions  by using
 the selection criteria on PRTJOBQTIM.

 The  CVTJOBQTIM  command  is  used first  to  select  records  from the
 JOBACGP file (created by the TAA Job Accounting tool).

             CVTJOBQTIM   JOBACGLIB(xxx) OUTLIB(yyy)

 Only batch  jobs would be  converted.  Those  jobs that  do not have  a
 start  date (such  as they  were ended  while still  on the  job queue)
 would  be bypassed.   The  defaults used  would select  all dates/times
 and bypass the job names that  begin with Q (most likely system  jobs).
 The time spent on  the jobq queue would be  calculated and the JOBQTIMP
 file would be output.

 The PRTJOBQTIM command may then be used such as:

             PRTJOBQTIM   MINTIME(10) SORTBY(*JOB) JOBQTIMPLB(yyy)

 The  listing would appear in  job name order.   Any job  that waited on
 the job queue  for 10 or more  seconds before it  was started would  be
 printed.

 Considerations
 --------------

   **   The  job  must  have  been  completed   to  be  considered  (job
        completion causes the job accounting record).

   **   The  system  does not  track  the  job queue  that  the job  was
        started  from  in  the  job  accounting  information.    The TAA
        DSPJOBSTRA command may be used  to display the job queue  if the
        job is still known to the system.

   **   A job  can be moved from one  job queue to another  before it is
        started.   No information exists in  the job accounting entry to
        account for this.

   **   A job can be ended while it  is on the job queue and thus  never
        started.   These jobs are bypassed  by CVTJOBQTIM as  not having
        a valid start date.

   **   A  job may be submitted  with a scheduled date/time.   The entry
        date/time is  when the  job was  submitted.   The job  will  not
        start until  the scheduled  date/time is  met.  If  the job  has
        not  started, it  will be bypassed  by CVTJOBQTIM.   If  the job
        was  started, it will appear as  having waited on the job queue.
        The job  accounting  information does  not  provide any  special
        indication  that  the  job   was  not  started  because  of  the
        scheduled date/time.

   **   A  job may be  submitted with HOLD(*YES).   If the  job is never
        released,  the  start  date  does  not  exist  and  the  job  is
        bypassed  by CVTJOBQTIM.   If  the job  is released,  it may  be
        several  days  later  and  should  not  be  considered  in  your
        analysis.  The job accounting  information does not provide  any
        special indication that  the job was  released at a  later date.

   **   You  can   minimize  some  of  the   misleading  information  by
        specifying  a MAXTIME value to appear  on the listing and bypass
        jobs that were not actually  waiting for an activity slot.   The
        default MAXTIME is 86,400 seconds (24 hours).

   **   Jobs  entered  with  the  Job  Scheduler  (WRKJOBSCDE)  are  not
        entered into the system until the date/time specified.

   **   If  the entry or  start dates are  invalid or the  start date is
        somehow less  than  the  entry  date, the  job  is  bypassed  by
        CVTJOBQTIM and informational messages will occur.

   **   If the  CHGACGCDE command  is used  during a  job, multiple  job
        accounting  entries will be written.   Each entry  has the entry
        date and  start  date of  the  job.   Each  entry will  cause  a
        record to be created  in JOBQTIMP.  The additional  records will
        be  bypassed  by  PRTJOBQTIM  if  they  have  been  sorted  into
        consecutive sequence such as by SORTBY(*JOB).

 CVTJOBQTIM and PRTJOBQTIM Options
 ---------------------------------

   **   A  range of  dates and times  may be entered  on both CVTJOBQTIM
        and  PRTJOBQTIM.     If  you  are   going  to  analyze   various
        conditions, you  may want to convert all  job accounting records
        or  a  wide  range of  dates  using CVTJOBQTIM.    You  may then
        subset the dates using PRTJOBQTIM.

   **   The option  to include  or exclude  job names  beginning with  Q
        exists on both  CVTJOBQTIM and PRTJOBQTIM.  A  typical use would
        be  to use  the default on  CVTJOBQTIM to  bypass any  Qxxx name
        jobs (typically  system jobs  you  are probably  not  interested
        in).  If the Qxxx  jobs are not in the file, it  does not matter
        what  the INCQJOB value  is on PRTJOBQTIM  as no such  jobs will
        exist.

   **   The   JOBQTIMP  file  output  by   CVTJOBQTIM  may  be  used  by
        PRTJOBQTIM or by your own query.

   **   PRTJOBQTIM lets  you  select  on  dates, times,  a  generic  job
        name, a  generic user name, and the  minimum/maximum times spent
        on the job queue.

   **   PRTJOBQTIM  allows you  to sort  by entry date/time,  job, user,
        or the time  spent on the  job queue.   Ascending or  descending
        sequence may be specified.

 PRTJOBQTIM escape messages you can monitor for
 ----------------------------------------------

 None.  Escape messages from based on functions will be re-sent.

 CVTJOBQTIM Command parameters                         *CMD
 -----------------------------

    JOBACGLIB     The  name  of  the  library  where  the  JOBACGP  file
                  exists  as  created by  the TAA  Job  Accounting tool.
                  The CVTJOBACG tool must be  run to add records to  the
                  file.

                  The  library value  defaults to  *LIBL.   *CURLIB  may
                  also be used.

    STRDATE       The  start date  of  the jobs  to be  included.   This
                  means  the earliest  'entry date'  of the  jobs in the
                  JOBACGP  file.   The  default  is *BEGIN  meaning  the
                  first record in the file.

                  *TODAY may  be specified to  mean begin with  the jobs
                  that entered the system on today's date.

                  A specific date in job date format may be entered.

    ENDDATE       The  end date of the jobs to  be included.  This means
                  the latest 'entry  date' of  the jobs  in the  JOBACGP
                  file.   The default  is *END  meaning the last  record
                  in the file.

                  A  specific date  in job date  format may  be entered.
                  The  date  must  be  greater  than  or  equal  to  the
                  STRDATE value.

    STRTIME       The start  time  of the  jobs to  be  included.   This
                  means  the earliest 'entry  time' of  the jobs  in the
                  JOBACGP   file  based  on  the  STRDATE  value.    The
                  default is  *BEGIN meaning  the first  record for  the
                  STRDATE specified.

                  A specific  time may be  entered in HHMMSS format.   A
                  valid  time must  be entered in  a range  of 000000 to
                  235959.

    ENDTIME       The end time of the  jobs to be included.  This  means
                  the latest  'entry time'  of the  jobs in  the JOBACGP
                  file.   The  default is *END  meaning the  last record
                  for the ENDDATE specified.

                  A specific time may  be entered in  HHMMSS format.   A
                  valid time  must be entered  in a  range of 000000  to
                  235959.    If the  STRDATE  and  ENDDAT  are the  same
                  dates,  the ENDTIME must  be greater than  or equal to
                  the STRTIME value.

    INCQJOB       A  *YES/*NO  value for  whether  job  names  beginning
                  with the  letter Q  are to be  included.   The default
                  is  *NO as you  would normally want  to exclude system
                  jobs.

                  *YES may be specified  to include job names  beginning
                  with Q.

    OUTLIB        The  library  in  which  the  JOBQTIMP  file  will  be
                  placed.   The default is *LIBL.   If the JOBQTIMP file
                  does not already exist,  a library must be  specified.

                  The  model file  is  TAAACGFP with  a  format name  of
                  JOBQTIMR.

    OUTMBR        The member  of the JOBQTIMP  file to be used.   If the
                  member  does not exist,  it is added.   The default is
                  JOBQTIMP.

    REPLACE       A *YES/*NO  value  for whether  the member  should  be
                  cleared before  writing records into it.   The default
                  is *YES.

                  *NO  may  be  specified  to  add  records  to existing
                  data.

 PRTJOBQTIM Command parameters                         *CMD
 -----------------------------

    STRDATE       The start  date of  the  jobs to  be included.    This
                  means the  earliest 'entry  date' of  the jobs  in the
                  JOBQTIMP  file.   The  default is  *BEGIN  meaning the
                  first record in the file.

                  *TODAY may be  specified to mean  begin with the  jobs
                  that entered the system on todays date.

                  A specific date in job date format may be entered.

    ENDDATE       The end date of  the jobs to be included.   This means
                  the latest  'entry date' of  the jobs in  the JOBQTIMP
                  file.   The  default is  *END meaning  the last record
                  in the file.

                  A specific  date in  job date format  may be  entered.
                  The  date  must  be  greater  than  or  equal  to  the
                  STRDATE value.

    STRTIME       The  start  time of  the jobs  to  be included.   This
                  means the earliest  'entry time'  of the  jobs in  the
                  JOBQTIMP  file  based  on  the  STRDATE  value.    The
                  default  is *BEGIN  meaning the  first record  for the
                  STRDATE specified.

                  A specific time may  be entered in  HHMMSS format.   A
                  valid time  must be entered  in a  range of 000000  to
                  235959.

    ENDTIME       The end  time of the jobs to be  included.  This means
                  the  latest 'entry time'  of the jobs  in the JOBQTIMP
                  file.   The default is  *END meaning  the last  record
                  for the ENDDATE specified.

                  A specific  time may be  entered in HHMMSS format.   A
                  valid  time must  be entered in  a range  of 000000 to
                  235959.   If  the  STRDATE  and ENDDAT  are  the  same
                  dates, the  ENDTIME must be  greater than or  equal to
                  the STRTIME.

    INCQJOB       A  *YES/*NO  value  for  whether  job names  beginning
                  with the letter  Q are  to be included.   The  default
                  is *NO  as you would  normally want to  exclude system
                  jobs.

                  *YES may  be specified to include  job names beginning
                  with Q.

    JOB           The  job  name to  select.   The default  is *ALL.   A
                  specific job name  or a generic  name may be  entered.

    USER          The  user name to  select.   The default  is *ALL.   A
                  specific  user name or a generic  name may be entered.

    MINTIME       The minimum amount  of time in  seconds the job  spent
                  on  the  job  queue  to allow  it  to  appear  on  the
                  listing.  The default is 0 meaning any time.

                  If  a value such as  10 is entered, the  job must have
                  spent at least 10 seconds  on the job queue to  appear
                  in the listing.   Entering a non-trivial  value allows
                  you  to bypass all  the jobs  which are  being started
                  within a reasonable amount of time.

    MAXTIME       The  maximum amount of  time in seconds  the job spent
                  on  the  job queue  to  allow  it  to  appear  on  the
                  listing.   The default  is 86,400 seconds  (24 hours).

                  If  the default  is  used, any  jobs that  waited more
                  than  a  24  hour  period  would  not  appear  in  the
                  listing.   Entering a value  allows you to  bypass all
                  the  jobs which  were held for  several days  and then
                  released or scheduled by SBMJOB for a future date.

    SORTBY        How to  sort  the  JOBQTIMP  file.    The  default  is
                  *ENTRYDATE  meaning the  data  appears in  entry  date
                  and time sequence.

                  *JOB  may be  specified  meaning the  data  appears by
                  job name and entry date/time sequence.

                  *USER  may be  specified meaning  the data  appears by
                  user and entry date/time sequence.

                  *JOBQTIME may  be specified  meaning the data  appears
                  by  the  amount of  time  the  job  spent on  the  job
                  queue.    Secondary  sort fields  are  entry  date and
                  time.

    SEQ           How to sequence  the sorted  output.   The default  is
                  *ASCEND for ascending sequence.

                  *DESCEND may be specified for descending sequence.

    JOBQTIMPLB    The library  containing the  JOBQTIMP file  created by
                  CVTJOBQTIM.   The  default is *LIBL.   *CURLIB  may be
                  used.

    MBR           The  member   of   the  JOBQTIMP   file   created   by
                  CVTJOBQTIM.  The default is *FIRST.

 Restrictions
 ------------

 None.

 Prerequisites
 -------------

 The following TAA Tools must be on your system:

      CHKGENERC       Check generic
      CHKTIM          Check time
      CLCDATDIF3      Calculate date difference 3
      CVTDAT          Convert date
      CVTTIM          Convert time
      DUPTAADBF       Duplicate TAA Data Base file
      EDTVAR          Edit variable
      JOBACG          Job Accounting
      RTVDAT          Retrieve date
      RTVSYSVAL3      Retrieve system value 3
      SNDCOMPMSG      Send completion message
      SNDESCMSG       Send escape message
      SNDSTSMSG       Send status message
      SORTDBF         Sort data base file

 Implementation
 --------------

 None, the tool is ready to use.

 Objects used by the tool
 ------------------------

    Object        Type    Attribute      Src member    Src file
    ------        ----    ---------      ----------    ----------

    CVTJOBQTIM    *CMD                   TAAACGF       QATTCMD
    PRTJOBQTIM    *CMD                   TAAACGF       QATTCMD
    TAAACGFC      *PGM       CLP         TAAACGFC      QATTCL
    TAAACGFC2     *PGM       CLP         TAAACGFC2     QATTCL
    TAAACGFC11    *PGM       CLP         TAAACGFC11    QATTCL
    TAAACGFR      *PGM       RPG         TAAACGFR      QATTRPG
    TAAACGFR2     *PGM       RPG         TAAACGFR2     QATTRPG
    TAAACGFP      *FILE      PF          TAAACGFP      QATTDDS

 Structure
 ---------

 CVTJOBQTIM  Cmd
    TAAACGFC   CL pgm
      TAAACGFR   RPG Pgm  - Writes to JOBQTIMP file
        TAAACGFC11 CL pgm    - Checks valid dates

 PRTJOBQTIM  Cmd
    TAAACGFC2  CL pgm
      TAAACGFR   RPG Pgm     - Reads JOBQTIMP file and prints

Added to TAA Productivity Tools March 15, 2003


Home Page

Last modified on November 19, 2014 © 1995, 2014 - TAA Tools, Inc.