TAA Tools
MTNJRN2         MAINTAIN JOURNAL 2                     TAAJROX

The Maintain  Journal  2 command  provides the  ability  to delete  old
receivers  (and add  a new  receiver) to  one or  more journals.   Both
system and user journals may be specified.

You must have *ALLOBJ special authority to use MTNJRN2.

A typical command would be:

             MTNJRN2   JRN(*ALL/*ALL) BYPSYSMNG(*NO)
                         DLTOLDRCVR(*YES) RETAINDAYS(15)

All  journals on  the system  would have  their receivers  deleted that
have an attach date older than  15 days.  If any receiver  is attempted
to  be  deleted that  has  not been  saved,  an  inquiry message  would
occur.   A listing would be  displayed with one line  per journal and a
summary of  how many  journal receivers  were deleted  and the  storage
amount.

Note that  the BYPSYSMNG  parameter defaults  to bypass  system managed
journals.   The typical command  shown will manage all  journals on the
system.   SAVINQMSG(*YES) is  the  default and  will cause  an  inquiry
message if any journal receivers have not been saved.

A testing option exists.  See the DLTOLDRCVR(*TEST) function.

Journal usage
-------------

The  system  keeps  track of  the  journal  receivers  that  have  been
attached  to a  journal.   It is  called a  'chain'  of receivers.   In
order  to recover  using the  APYJRNCHG command,  the chain  of journal
receivers you want to  recover from must be  intact.  You can't  have a
deleted  receiver in  the middle  of  a chain  that you  are trying  to
recover from.

A  typical approach is to save  the journal receivers periodically such
as with a  full system  save then delete  those that are  saved.   This
ensures that you  can do a restore  of the receivers and  still be able
to use APYJRNCHG.

If  you specify MTNJRN2  with SAVINQMSG(*YES),  the system will  send a
message for any  journal receivers that  have not been  saved that  you
are requesting  to be  deleted.  For  some system  journals, it  can be
valid to  delete the journal  receiver even though  it is not  saved as
it  may only  be used  at IPL  after an  abnormal termination.   Rather
than try to  understand the  complex rules of  the system, the  easiest
solution is to follow the same approach for all journals.

MTNJRN2 escape messages you can monitor for
-------------------------------------------

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

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

   JRN           The  qualified   name  of  the   journal  to  maintain
                 journal  receivers   for.    A  generic  name  or  the
                 special value *ALL may be entered.

                 The library  name  defaults  to  *LIBL.    A  specific
                 library  may   be  entered   or  the   special  values
                 *USRLIBL,  *CURLIB,  *ALL,  or *ALLUSR.    A  value of
                 JRN(*ALL/*ALL)  will  maintain  all  journals  on  the
                 system.

   BYPSYSMNG     A  *YES/*NO parameter  for  whether to  bypass  system
                 managed  journals.   The  default  is  *YES to  bypass
                 journals  that are  specified as system  managed.  See
                 the discussion of the MNGRCV parameter on CRTJRN.

                 *NO  may  be  specified  to  include   system  managed
                 journals.

   GENNEWRCVR    Whether to  generate a new  receiver.  The  default is
                 *NO.   *YES may  be specified to cause  a new receiver
                 to be  generated.    Both  GENNEWRCVR  and  DLTOLDRCVR
                 cannot be *NO.

   DLTOLDRCVR    Whether  to delete  old  receivers.   The  default  is
                 *NO.    *YES  may  be  specified  to delete  receivers
                 based on the  RETAINDAYS value.   See also  BYPSYSMNG.
                 Both GENNEWRCVR and DLTOLDRCVR cannot be *NO.

                 *TEST  may be  entered  to  allow a  determination  of
                 what  MTNJRN2  would do  if  *YES was  specified.   No
                 journal  receivers would  be deleted,  but the listing
                 will describe  what would  have happened  if *YES  had
                 been  specified.   If  DLTOLDRCVR(*YES) is  specified,
                 GENNEWRCVR must be *NO.

   RETAINDAYS    The   number  of  days   to  retain  existing  journal
                 receivers.  The  default is  15 days.   The number  of
                 days  specified   is  used   to  calculate   the  last
                 retention date.

                 The  last  retention date  is compared  to  either the
                 attach date  (the  default)  or  the  detach  date  as
                 determined by the RETAINTYPE parameter.

                 If you  want to  keep more  than the attached  journal
                 receiver  online,  you would  normally  specify a  day
                 which  is  1  greater  than  the  date  the previously
                 attached   journal    receiver   was   attached    (or
                 detached).

   RETAINTYPE    Whether the  RETAINDAYS parameter should  refer to the
                 attach date or the detach date.

                 *ATTACH  is the  default to  use a comparison  of when
                 the receiver was first attached.

                 *DETACH may be specified to  use a comparison of  when
                 the receiver was detached.

   SAVINQMSG     Whether the  system message should  occur if  a delete
                 journal  receiver  request is  made  and  the receiver
                 has not  been  saved.   The  default is  *YES  meaning
                 that you will receive  an inquiry message.  If  *NO is
                 specified,  be  sure you  understand  the implications
                 of  deleting a receiver  that has not  been saved (see
                 the section on journal usage).

                 *BYPASS  may  be  specified  to  bypass   the  inquiry
                 message  if the  journal receiver  has not  been saved
                 (no action occurs on the journal receiver).

   IGNEXITPGM    A  *YES/*NO parameter for  whether to  ignore the exit
                 program      registered      for      exit       point
                 QIBM_QJO_DLT_JRNRCV.

                 *NO is the default to allow the exit program.

                 *YES  may be  specified  to ignore  the exit  program.
                 DLTOPT(*IGNEXITPGM)   is  passed   to   the  DLTJRNRCV
                 command.

   IGNTGTRCV     A *YES/*NO  parameter for  whether  to ignore  that  a
                 remote   journal   receiver   which   is   immediately
                 downstream  on  a  target  system  be required  to  be
                 full.

                 *NO   is  the   default  which   requires  the  target
                 receiver to be full.

                 *YES may  be specified  to ignore  whether the  target
                 receiver  is full.   DLTOPT(*IGNTGTRCV)  is passed  to
                 the DLTJRNRCV command.

   OMITJRN       A  list of  up to  100 journals  that may  be omitted.
                 *NONE is  the  default.   Both  the journal  name  and
                 library must be specified.

   OUTPUT        How  to output  the  results.   *  is  the default  to
                 display  the spooled  file if  the command  is entered
                 interactively.  If  the display is  ended with  F3/F12
                 or the  Enter key, the  spooled file is  deleted after
                 it  is displayed.   To  retain  the spooled  file, you
                 may  use the the System  Request 'Cancel' function and
                 the spooled file will exist in a HLD status.

                 If the  command  is  entered  in batch  or  *PRINT  is
                 specified,  the spooled file  is output  and retained.


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

You must have *ALLOBJ special authority to use MTNJRN2.

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

The following TAA Tools must be on your system:

     ADDDAT2         Add date 2
     CHKALLOBJ       Check *ALLOBJ special authority
     CHKIBMPRF       Check IBM profile
     CVTOBJD4        Convert object description 4
     EDTVAR          Edit variable
     EXTLST          Extract list
     EXTLST2         Extract list 2
     MTNJRN          Maintain journal
     RMVMSGKEY       Remove message key
     RTVJRNA         Retrieve journal attributes
     RTVSYSVAL3      Retrieve system value 3
     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
   ------        ----    ---------      ----------    ----------

   MTNJRN2       *CMD                   TAAJROX       QATTCMD
   TAAJROXC      *PGM       CLP         TAAJROXC      QATTCL
   TAAJROXR      *PGM       RPG         TAAJROXR      QATTRPG
					

Added to TAA Productivity tools January 15, 2014


Home Page Up to Top