TAA Tools
MTNALLJRN       MAINTAIN ALL JOURNALS                  TAAJROJ

The Maintain All Journals  command provides a simple means  of creating
and  deleting journal receivers  for all journals  on the system.   The
command  is intended  to be run  just prior to  a backup.   This allows
for  a  full save  of  the  recently  detached  journal  receivers  and
deletes any  old journal receivers that  are already saved.   A listing
is  provided  of all  journals and  journal  receivers with  any action
taken.

An omit list  may be specified as  well as a  number of retention  days
before deletion is allowed.

You  must be  authorized to  the  TAAMTNJRN authorization  list to  use
MTNALLJRN.

Both  creating  and  deleting  journal  receivers  are  options.    The
default for both is *NO.  This  allows you to easily test the  function
without making any changes.   Also see the later  discussion of testing
MTNALLJRN.    Specifying  *NO  to  both  parameters  still  provides  a
listing of all journals and journal receivers.

If  you request to delete journal  receivers, the journal receiver must
have been  fully  saved and  detached prior  to  the retention  period.
See  the QUSRSYSRCV  parameter option  for journal  receivers  used for
QUSRSYS journals.

A typical command would be:

             MTNALLJRN   GENNEWRCVR(*YES) DLTOLDRCVR(*YES)
                           RETAINDAYS(5)

Any  journals that  are specified  as managed by  the system  (MNGRCV =
*SYSTEM) and specified as DLTRCV  = *YES are automatically bypassed  as
the system maintains the creation and deletion.

A listing  would be  produced with  all journals  on the  system and  a
line for  each receiver.  A  new journal receiver would  be created for
each *USER  managed journal.    Any journal  receivers that  have  been
saved and were detached more than 5 days ago would be deleted.

Those  journal  receivers  which  have  been  created  or  deleted  are
flagged on the listing along with summary totals.

Testing MTNALLJRN
-----------------

There are three testing functions.

  **   If  GENNEWRCVR(*NO)   and  DLTOLDRCVR(*NO)  are  specified,  the
       listing  is  output, but  no  journal receivers  are  created or
       deleted.   The  value  in  RETAINDAYS  will  cause  the  journal
       receivers  that   would  be  deleted  to  be   flagged  as  %PRP
       (proposed).

       This  provides  a simple  method  of determining  what  would be
       deleted.

  **   If  a library  is  entered  for  the  LIB  parameter,  only  the
       journals in that library will be considered.

  **   If a  journal name  is entered  into the  TSTJRN parameter  such
       as:

             MTNALLJRN   TSTJRN(xxx/JRN1) ...

       Only that  journal will be considered  for creating and deleting
       journal receivers.   This  allows  you to  see how  the  command
       will handle the create and delete of receivers.

MTNALLJRN escape messages you can monitor for
---------------------------------------------

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

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

   LIB           The name  of the  library containing  the journals  to
                 be   processed.     The  default   is  *ALL   for  all
                 libraries.

                 The  special value *ALLUSR  may be entered.   This has
                 the  same  definition   as  exists  for   the  DSPOBJD
                 command.

                 A  specific library  (or a  generic library  name) may
                 be  entered  to limit  the journals  processed.   Only
                 the library  specified will  be processed.    Journals
                 in other  libraries are  not considered  (they do  not
                 appear in the listing).

   GENNEWRCVR    A  *YES/*NO parameter  for whether new  receivers will
                 be created for any journals  that are not on the  omit
                 list and  are  specified as  MNGRCV(*USER).   Journals
                 that    are   specified    as    MNGRCV(*SYSTEM)   and
                 DLTRCV(*YES) are not considered.

                 *NO  is the  default to prevent  any journal receivers
                 from being created.

                 *YES  may  be  specified  to  create  a   new  journal
                 receiver.     The   CHGJRN   command   is  used   with
                 JRNRCV(*GEN).

                 If   dual   journaling  is   supported   (two  journal
                 receivers receiving entries  at the  same time),  then
                 two new receivers are created.

   DLTOLDRCVR    A  *YES/*NO option  for whether  old receivers  (based
                 on the RETAINDAYS parameter) will be deleted.

                 *NO  is the default meaning  no journal receivers will
                 be deleted.

                 *YES may be  specified to cause  journal receivers  to
                 be  considered for  deletion.    To delete  a  journal
                 receiver, the following must be met:

                 The  MNGRCV  attribute must  be  *USER (not  *SYSTEM).
                 Note  that  if MNGRCV(*USER)  is specified  the system
                 does not allow DLTRCV(*YES).

                 The  journal  cannot  be  specified  on   the  OMITJRN
                 parameter.

                 The  journal  receiver  must  have been  fully  saved.
                 Those   receivers  which  have  been  partially  saved
                 (status = PARTIAL) or are  not in a SAVED status  will
                 not be deleted.

                 The journal  receiver must be  detached (it  cannot be
                 actively receiving journal entries).

                 The   retention  period   (based  on   the  RETAINDAYS
                 parameter) must have been past.

   QUSRSYSRCV    A *YES/*NO parameter  for whether  a journal  receiver
                 for  a journal  in  QSYS  (such  as QDSNX)  should  be
                 deleted  if the  detach date  is  prior to  the retain
                 date  (see  the  RETAINDAYS  parameter)  regardless of
                 whether the receiver  has been saved.   If you do  not
                 save  QUSRSYS on  a  regular basis  (such as  weekly),
                 this   option  will   allow   a  cleanup   of  journal
                 receivers that  are  used primarily  for  an  abnormal
                 IPL recovery.

                 *NO  is the  default  meaning  only journal  receivers
                 for  QUSRSYS journals that  are saved  will be deleted
                 if the detach date is prior to the retain date.

                 *YES may  be  specified to  delete  journal  receivers
                 for a  QUSRSYS  journal that  has not  been saved  and
                 the detach date is prior to the retain date.

   RETAINDAYS    The  number of  days to  retain the  journal receivers
                 online  after they  have been  detached.   The default
                 is 5.

                 If  DLTOLDRCVR(*NO)  is  specified,  the  retain  days
                 value  is use  to  flag those  journal receivers  that
                 would  be deleted.   See  the %PRP (proposed)  flag on
                 the listing.

   OMITJRN       Up to  200  journals which  should  be omitted.    The
                 default is *NONE.

                 A specific  journal name, a  generic journal  name, or
                 the  special   value  *ALL  may  be  entered  for  the
                 journal to  be  omitted.    Entering  *ALL  omits  all
                 journals in a specific library.

                 The  default  library  qualifier  is   *LIBL.    If  a
                 generic  name or *ALL  is entered, a  specific library
                 qualifier must be entered.

                 Any  omitted  journals  will not  be  included  in the
                 listing and no create  or delete action will occur  to
                 the journal  receivers.  Note  that if the  journal is
                 omitted,  it does not matter  what library the journal
                 receivers are in (no action will occur).

   TSTJRN        The  name of  the  test  journal  to  be  used.    The
                 default is *NONE.

                 This  parameter  is  intended  for use  when  you  are
                 testing  the   MTNALLJRN  function.    By  entering  a
                 qualified  name  of  a   journal,  the  listing   will
                 describe any deleted or created journal receivers.

                 The library qualifier defaults to *LIBL.

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

You must  be  authorized to  the TAAMTNJRN  authorization  list to  use
MTNALLJRN.

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

The following TAA Tools must be on your system:

     ADDDAT          Add date
     CHKGENERC       Check generic
     CHKGENOBJ       Check generic object
     CHKOBJ3         Check object 3
     CVTDAT          Convert date
     CVTJRNA         Convert journal attributes
     EDTVAR          Edit variable
     EXTLST          Extract list
     RPGSTSDS        RPG status data structure
     RTVJRNA         Retrieve journal attributes
     RTVOBJD2        Retrieve object description 2
     RTVOBJLST       Retrieve object list
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDDIAGMSG      Send diagnostic message
     SNDESCMSG       Send escape message

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

None, the tool is ready to use.

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

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

   MTNALLJRN     *CMD                   TAAJROJ       QATTCMD
   TAAJROJC      *PGM       CLP         TAAJROJC      QATTCL
   TAAJROJC2     *PGM       CLP         TAAJROJC2     QATTCL
   TAAJROJC3     *PGM       CLP         TAAJROJC3     QATTCL
   TAAJROJR      *PGM       RPG         TAAJROJR      QATTRPG
					

Added to TAA Productivity tools August 15, 2003


Home Page Up to Top