TAA Tools

The Check  Standard Jobs command  provides a  method of determining  if
required system  and standard processing  jobs are active.   CHKSTDJOBS
operates  by using  the output  of the  TAA CVTWRKACT command  when the
system is  known to  be  in a  good state.   When  a  check is  needed,
CVTWRKACT is used again and compared against the standard values.


  **   It  is  best (but  not  essential) to  run  this  test when  the
       system is quiet and no other batch work is being performed.

  **   To provide for a test, enter the following command:


       This  will submit  a job which  waits for  5 minutes  to allow a

  **   Run the  following  CRTSTDJOBS command.    Choose a  library  so
       that  the  STDJOBP  file  will  be  on  the  library  list  when
       CHKSTDJOBS is run.

            CRTSTDJOBS  OUTLIB(xxx)

       The  STDJOBP file would be  created with the  active batch jobs.

  **   Run the  CHKSTDJOBS command.   This  command would  normally  be
       run with  the default  of DLTSPLF(*YES)  which would produce  an
       escape  message  if any  jobs  from  STDJOBP  are not  currently


       If  a batch job was in existence  when CRTSTDJOBS was run and is
       now complete,  you should see  an escape  message.  The  spooled
       file is always retained if an error occurs.

  **   End the test job that was submitted:


  **   After waiting a  moment for the TSTSTDJOBS job  to be ended, run
       the CHKSTDJOBS command again:


       You  should  receive an  escape message  because  the TSTSTDJOBS
       job is no longer active.

  **   Display the  output  listing.    You should  at  least  see  the
       TSTSTDJOBS job is flagged.

       You will  probably see some standard  jobs with a count  of more
       than one.   This is typical  of system server jobs.   When there
       is more  than one  job for  the same  subsystem,  job, and  user
       name  (the  job  number  is  not  considered),  the  count  will
       reflect the number of duplicates.

       Note  that it  is  not an  error  if additional  batch  jobs are
       active.  Only the standard jobs are considered.

Establishing a standard jobs file

  **   The  CRTSTDJOBS command  should be run  when the system  is in a
       state that  you  would consider  'standard', but  no  additional
       batch jobs are being run.

       If you want  to use the same library as used  in the prior test,


  **   You can check the file with:

              CHKSTDJOBS  DLTSPLF(*NO)

  **   If  a job is  active that  you do not  want to  be considered as
       standard, the record  should be removed  from the STDJOBP  file.

       You can  add or  delete records  from the  STDJOBP file using  a
       variety of data base functions.

The TAA  Tool EDTDBF can be  used to both add and  delete.  When adding
a new record, the following fields must be entered: such as EDTDBF.

                AJSBS     Subsystem
                AJJOB     Job
                AJUSR     User

       The field AJJCPU is used  by CRTSTDJOBS to determine the  number
       of  jobs  that  should   exist.    Enter  a  value   for  AJJCPU
       (typically  1).    If  you  have  multiple  jobs  for  the  same
       subsystem,  job, and  user, enter  the count  of duplicates into

  **   Once you  have the  STDJOBP  file as  desired, you  can run  the
       CHKSTDJOBS  command and  check  for errors.    The following  is
       typical code in a CL program.

             CHKSTDJOBS  STDJOBPLIB(xxx)
             MONMSG      MSGID(TAA9893) EXEC(DO) /* Failed */
                         /*                                */
                         /*  Your handling of the failed   */
                         /*    condition                   */
                         /*                                */
             ENDDO       /* Failed */

       You  might want to  have a never  ending program  submitted by a
       startup program that checks every hour such as:

     LOOP:   DLYJOB     DLY(3600)
                        /* Previously shown code */
                        GOTO LOOP

  **   On each  new  release  of  the  system (or  in  some  cases  PTF
       changes),  you may  need to  repeat the  process to  see if  the
       system has added other jobs that need to be considered.

How CHKSTDJOBS operates

When  CRTSTDJOBS is  run, the TAA  Tool CVTWRKACT  is used to  output a
file of the active batch jobs.   The file is then sorted by  subsystem,
job, and  user.   The AJJCPU field  is used  to hold  the count of  the
required active jobs.  It is zeroed out in all records.

The CVTWRKACT  file is then  read and each corresponding  record in the
sorted  file is updated with a count of  one in the AJJCPU field.  Note
that the key is  subsystem, job, and user  so only the first  duplicate
record (if any) is updated for each duplicate.

The file is then copied to the STDJOBP file in the named library.

When CHKSTDJOBS  is run, CVTWRKACT is  used for the  active batch jobs.
The AJINTC field is zeroed out for each record in the STDJOBP file.

Each  active job is then  read and if a  corresponding record exists in
STDJOBP, the AJINTC field is updated with a count of one.

The STDJOBP  is then  read  and the  AJJCPU field  is compared  to  the
AJINTC field.  Any  differences are flagged.  A  spooled file is always
output.     If  no   differences  were  found   and  DLTSPLF(*YES)  was
specified, the spooled file is deleted.

If differences were found, an escape message is issued.

CHKSTDJOBS escape messages you can monitor for

      TAA9893    One or more jobs that should be active are not.

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

CRTSTDJOBS Command parameters                          *CMD

   STDJOBPLIB    The library where  the STDJOBP file  will exist.   The
                 command  should  be  run  when  the  system  is  in  a
                 standard  state,  but no  other  batch  work is  being
                 performed.  See the tool documentation.

   ACTION        The action to be performed.

                 *CREATE  is the  default to  create the  file and copy
                 the active batch jobs.

                 *REPLACE may be specified  to replace the data  in the
                 existing file with the current active batch jobs.

CHKSTDJOBS Command parameters                          *CMD

   STDJOBPLIB    The  library  where the  STDJOBP  file  exists.   This
                 file must be created by CRTSTDJOBS.

   DLTSPLF       A  *YES/*NO  value to  determine if  the  spooled file
                 created by the command should be retained.

                 *YES is  the  default to  delete  spooled file  if  no
                 differences are  found.   Note that  the spooled  file
                 is always retained if differences are found.

                 *NO  may  be specified  to always  retain  the spooled




The following TAA Tools must be on your system:

     CVTWRKACT       Convert work active
     DUPTAADBF       Duplicate data base file
     EDTVAR          Edit variable
     RTVFMT          Retrieve format
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDDIAGMSG      Send diagnostic message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message
     SNDSTSMSG       Send status message
     SORTDBF         Sort data base file


See the previous instructions.

Objects used by the tool

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

   CHKSTDJOBS    *CMD                   TAAJOFC       QATTCMD
   CRTSTDJOBS    *CMD                   TAAJOFC2      QATTCMD
   TAAJOFCC      *PGM       CLP         TAAJOFCC      QATTCL
   TAAJOFCC2     *PGM       CLP         TAAJOFCC2     QATTCL
   TAAJOFCR      *PGM       RPG         TAAJOFCR      QATTRPG
   TAAJOFCR2     *PGM       RPG         TAAJOFCR2     QATTRPG

Added to TAA Productivity tools October 15, 2009

Home Page Up to Top