TAA Tools
DLTJOBLOG       DELETE JOB LOG                         TAALOGF

The Delete  Job Log  command deletes old  job logs  between a  range of
dates  that  match a  list  of  specified job  completion  codes.   The
default  is to  delete all  existing job  logs that  have had  a normal
completion (Completion code  = 00).   This allows  a simple removal  of
job log clutter.

The  user  of  the  command   must  be  authorized  to  the  TAACVTQHST
authorization list.

A typical command would be:

             DLTJOBLOG

This  would  delete  all  existing job  logs  that  have  a  normal job
completion code.

Options exist  to specify a  range of  dates and  the completion  codes
that should be checked for.

For example,  you might request that  all jobs that have  ended because
a subsystem  ended abnormally and are at least  two days old be deleted
with the command:

             DLTJOBLOG    TODAT(*PRV2) JOBCOMPCDE(60)

When a  job completes,  the system  writes the  job completion  summary
message (CPF1164) to the  job log, to QSYSOPR, and to  QHSTxxx files in
QSYS.   The message contains a  job completion code (00 =  Normal, 30 =
Abnormal, etc.).

DLTJOBLOG  converts the QHSTxxx files in QSYS to  a file in QTEMP.  The
file is read for  the CPF1164 job completion messages.   The completion
code  in the  message  is checked  against  the list  specified on  the
command.    If a  match  is found,  the DLTSPLF  command  is attempted.
Errors are monitored for such as the file or job no longer exist.

The DLTSUM  spooled  file is  output with  one  line for  each  CPF1164
message found and whether the job log was deleted.

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

   FROMDATE      The  From   date  to  determine   the  range   of  job
                 completion dates  to be considered for  deletion.  The
                 default is *OLDEST  meaning the oldest  date found  in
                 any existing QHSTxxx files.

   TODATE        The To date  to determine the range of  job completion
                 dates to  be considered for deletion.   The default is
                 *CURRENT   meaning  the  current  date  found  in  any
                 existing QHSTxxx  files.   *PRV1,  *PRV2, ...    *PRV5
                 may be  specified to delete based on  the current date
                 minus  1, minus 2 ...   minus 5.   A specific date may
                 also be entered.

   JOBCOMPCDE    A list  of  the job  completion  codes to  check  for.
                 The  default is  00  for a  normal  completion of  the
                 job.   If the job  has a completion  code that matches
                 one of the codes in the  list, DLTSPLF of the job  log
                 will be attempted.

                 One or more  of the following codes may  be specified.

       00 = Normal completion
       10 = Normal completion during controlled ending
       20 = Job exceeded ENDSEV job attribute
       30 = Abnormal completion
       40 = Job ended before becoming active
       50 = Job ended while the job was active
       60 = Subsystem ended abnormally while the job was active
       70 = System ended abnormally while the job was active
       80 = Job ended by ENDJOBABN command
       90 = Job ended by ENDJOBABN command after time limit

                 The codes  are also described  in the message  text of
                 the CPF1164 message.

   DETAIL        The  type of printing  to occur.   The default is *ALL
                 meaning one line  appears for every  job found in  the
                 QHST  files within  the range  of dates  specified and
                 an  indication of whether  the job log  was deleted or
                 a status  that  describes  whether  the  job  log  was
                 bypassed (based  on the JOBCOMPCDE parameter),  no job
                 log   exists,  or   any  error  conditions   found  by
                 DLTSPLF.

                 *DLTONLY may  be specified  to  print only  those  job
                 logs that have been deleted.

Security
--------

The  user must  be  authorized to  the  TAACVTQHST authorization  list.
The  CL programs  adopt authority to  allow reading  of the  QHST files
and  to ensure the user can delete spooled  files that are not his own.

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

The  QHSTxxx  files  in  QSYS  must  exist  for  the   range  of  dates
specified.   You should  not delete  these files  (such as  the DLTQHST
tool) until you have cleaned up the job logs with DLTJOBLOG.

No  CPF1164 message will exist, until  the job is completed.   If a job
does DSPJOBLOG  OUTPUT(*PRINT) during  the  job and  the job  does  not
complete  before DLTJOBLOG  is run,  the  job log  caused by  DSPJOBLOG
will  not be deleted.   If  the job completes  and produces a  job log,
there will  be  two  job logs  for  the  job.   If  the  job  completed
normally  and you  request  to  delete a  completion  code of  00,  the
ending  job log  (the one with  the CPF1164  message) will  be deleted,
but  not the  one caused  by DSPJOBLOG.   However, if  DLTJOBLOG is run
again with the  same range of  dates, the job  log caused by  DSPJOBLOG
will  be deleted.   If multiple  job logs  exist for  a job  (caused by
DSPJOBLOG),  only a  single job  log will  be deleted  for each  use of
DLTJOBLOG.

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

The following TAA Tools must be on your system:

     CVTQHST         Convert QHST
     EDTVAR          Edit variable
     EXTLST          Extract list
     EXTLST2         Extract list 2
     RTVDAT          Retrieve date
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCMSG       Send escape message
     SNDSTSMSG       Send status message

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

None, the tool is ready to use.

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

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

   DLTJOBLOG     *CMD                   TAALOGF       QATTCMD
   TAALOGFC      *PGM       CLP         TAALOGFC      QATTCL
   TAALOGFC2     *PGM       CLP         TAALOGFC2     QATTCL
   TAALOGFR      *PGM       RPG         TAALOGFR      QATTRPG
					

Added to TAA Productivity tools January 1, 1999


Home Page Up to Top