TAA Tools
DLTPNDJLG       DELETE PENDING JOB LOG                 TAASPPN

The Delete  Pending Job Log  command deletes  job log information  (not
QPJOBLOG  spooled  files)  where  the  job  log  information  is  in  a
'PENDING'  status.   A  'number of  days' pending  may be  specified to
delete only the job log  information that has been pending for  n days.
Specific, generic,  or all jobs/users may  be named.   The QWTRMVJL API
is used.

You must have *JOBCTL special authority to use DLTPNDJLG.

A typical command would be:

              DLTPNDJLG  JOB(*ALL/xxxx/*ALL) PNDDAYS(2)

This would  delete all job logs in a  PENDING status for the named user
that  have  been  existence  for   2  days.    There  is  no   specific
information returned about what job log information was deleted.

'PENDING' Job Log Status
------------------------

Job logs  are typically  converted to  a QPJOBLOG  spooled file when  a
job  ends or by use  of a Job Log  server.  However, if  the job log is
in a 'PENDING' status, the job  log information is retained as well  as
the job control block.

The job log  information would appear  in a 'PENDING' status  if CHGJOB
LOGOUTPUT(*PND) is  specified or the  same attribute is  specified in a
JOBD  or  on SBMJOB.    The LOGOUTPUT(*PND)  option  can be  helpful in
reducing the overhead caused  by converting job logs to  spooled files,
but this  results in the job  log information being left  on the system
and needs to be cleaned up at some point.

If  the job log information  is in a 'PENDING'  status, the information
can  be displayed  (such  as  by  DSPJOB  Option  10).    The  job  log
information  can be  converted  to a  QPJOBLOG  spooled  file by  using
CHGJOB LOGOUTPUT(*JOBEND).

The  WRKJOBLOG command may also  be used.   It will display  a state of
'*PND' for any  job logs that  are pending.   Using WRKJOBLOG, you  may
display  the  job log  information,  delete  it,  or convert  it  to  a
QPJOBLOG  spooled  file.   Using  WRKJOBLOG to  convert  to a  QPJOBLOG
spooled  file requires the WRKJOB option  and then option 40 for CHGJOB
with LOGOUTPUT(*JOBEND).

The system  CHGCLNUP command  may also be  used to  determine when  job
log information in a PENDING status is deleted.

The  advantage of  DLTPNDJLG  is that  it  offers a  command method  of
cleanup for either a very specific or general case situation.

DLTPNDJLG escape messages you can monitor for
---------------------------------------------

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

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

   JOB           The  fully qualified  name of  the job.   This is  a 3
                 part parameter.

                 Part 1 is  the job  name, generic job  name, or  *ALL.
                 A value is required.

                 Part 2 is  the user name, generic user  name, or *ALL.
                 A value is required.

                 Part  3  is  the  job number  or  *ALL.    A value  is
                 required.

   PNDDAYS       The number of  days the job  log information has  been
                 in  a  pending  status before  it  is  considered  for
                 deletion.  7  is the default.  The  value must be in a
                 range of 1 to 99999 or the special value *ZERO.

                 Use  *ZERO when you do not  need the pending job logs.
                 Ensure that the  JOB parameter values will  not delete
                 more  that  you  want.   See  also  the  PNDTYPE(*ALL)
                 discussion.

   PNDTYPE       The type of job log information to be removed.

                 *PND  is the  default  meaning to  delete any  job log
                 information for jobs  that have  been completed,  were
                 specified  with  a  *PND  attribute  (such  as  CHGJOB
                 LOGOUTPUT  =  *PND), and  match  the  JOB and  PNDDAYS
                 parameters.

                 *ALL  may  be   specified  to  delete   the  job   log
                 information (same as  *PND), but will also  delete the
                 job log  information before it  can be converted  to a
                 QPJOBLOG  spooled  file  for  jobs  specified  with  a
                 LOGOUTPUT  value  of  *JOBEND  or  *JOBLOGSVR.     For
                 example, when  a job completes,  there is a  window of
                 time  before  job log  information is  converted  to a
                 QPJOBLOG spooled file.   Specifying  *ALL, may  impact
                 jobs  that are  completed, but  have not  yet had  the
                 job information converted.


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

You must have *JOBCTL special authority to use DLTPNDJLG.

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

The following TAA Tools must be on your system:

     CHKJOBCTL       Check *JOBCTL special authority
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message

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

None, the tool is ready to use.

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

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

   DLTPNDJLG     *CMD                   TAASPPN       QATTCMD
   TAASPPNC      *PGM       CLP         TAASPPNC      QATTCL
					

Added to TAA Productivity tools January 15, 2012


Home Page Up to Top