TAA Tools
SAVCHG23        SAVE CHANGE 23                         TAASAVW

The Save  Change 23 command  is intended  to be used  on a daily  basis
between  a periodic  use of  a  Save Option  21 that  saves  the entire
system.   SAVCHG23  saves 1) System  values, 2) Reply  list entries, 3)
Edit  descriptions,  4)  Network  Attributes,  5)  Security   data,  6)
Configuration  data, 7)  Changes to  objects in  all user  libraries 8)
Changes  to  objects in  system  libraries  that contain  user  data 9)
Changes  to  DLO  objects,  and  10)  Changes  to  IFS  objects.    The
restricted state is not required.  IASPs are not saved.

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

SAVCHG23  does not require the  restricted state.  If  you use SAVCHG23
without entering the  restricted state,  you may find  some objects  in
use that  cannot be  backed up.   The  restricted state  is always  the
best  solution  for  ensuring your  backup,  but  may  not be  required
depending on your environment.

SAVCHG23 does the following:

  **   Runs  the TAA CVTSYSVAL command to  convert the system values to
       the SYSVALP file in  TAASECURE.  This allows recovery  using the
       RPLSYSVAL TAA command.

  **   Runs  TAA CVTRPYLE  command  to convert  the  system reply  list
       entries  to   the  RPYLSTP  file  in  TAASECURE.    This  allows
       recovery using the RPLRPYLE TAA command.

  **   Runs TAA CVTEDTD  command to  convert the  Edit Descriptions  to
       the EDTDP  file in  TAASECURE.  This  allows recovery  using the
       RPLEDTD TAA command.

  **   Runs  TAA CAPNETA command  to capture the  network attributes to
       the NETATTR  data  area  in TAASECURE.    This  allows  recovery
       using the RTNNETA TAA command.

  **   Runs SAVSECDTA is used to save security data.

  **   Runs SAVCFG is used to save configuration data.

  **   By default,  the last  date/time of  a SAVLIB LIB(*NONSYS)  (set
       by  Save Option  21) is determined  to use  as a  reference date
       and  time  for  the  SAVxxx commands.    *ALLUSR  or  a specific
       reference date and time may be used.

  **   Runs SAVCHGOBJ  LIB(*ALLUSR)  with  the reference  date.    This
       saves  all user libraries  and some  system libraries  which may
       contain  user  data  such  as QGPL.    The  libraries  which are
       omitted are  QSYS,  QRECOVERY, etc.    Access paths  are  saved.
       Journaled objects  are omitted by  default.  You  may optionally
       specify  a list  of  libraries or  generic library  names  to be
       omitted.

       If a  new  library  exists (was  never  fully  saved),  SAVCHG23
       saves  the objects.    This differs  from  the system  SAVCHGOBJ
       LIB(*LIB)  support which requires  a full  save to  occur before
       the use of SAVCHGOBJ.

  **   Runs SAVDLO to save the changed folders and documents.

  **   Runs  the  SAV command  to save  the changed  IFS objects.   The
       directories QSYS and QDLO are automatically omitted.

  **   Creates a  spooled file with  one line  per library and  summary
       information for the other saves.

  **   Runs  the TAA  CHKSAVRST command  by default.   This  provides a
       net listing of the important save messages.

Two  devices  are supported  to  allow alternate  writing.   A  list of
volume IDs may be specified.

A typical command would be:

             SAVCHG23    DEV(xxx) CLEAR(*ALL)

The save would be to the  mounted tape beginning at sequence number  1.

Recovery strategy using SAVCHG23
--------------------------------

The  recovery strategy  assumes  that you  are  using  a periodic  Save
Change 21 Option to backup the entire system and a daily SAVCHG23.

To recover, you would do the following:

  **   Restore  from the  Save Change  21  media.   See the  Backup and
       Recovery Guide for details.

  **   Restore from the SAVCHG23 media:

         --   Use RSTUSRPRF to restore the SAVSECDTA data.

         --   Use RSTCFG to restore the SAVCFG data.

         --   Use the  TAA  commands  RSTALLCHG  or  RSTMNYCHG  or  the
              system command RSTOBJ to restore the SAVCHGOBJ data.

         --   Use RSTDLO to restore the SAVDLO data.

         --   Use the RST command to restore the SAV data.

         --   Run  the RSTAUT  command  to restore  the  authorizations
              from the internal table built when RSTUSRPRF was run.

  **   Because QSYS  and other system  libraries are not  saved by Save
       Change  23, there are  some changes that may  occur in QSYS that
       need to be re-applied from the last SAVLIB LIB(*NONSYS).

         --   System  values.   As  part  of  SAVCHG23,  the  TAA  tool
              CVTSYSVAL is  used to you  to capture the  current values
              in  the SYSVALP  file  in TAASECURE.   Replace  them with
              the TAA RPLSYSVAL command.

         --   System reply list.   As  part of SAVCHG23,  the TAA  tool
              CVTRPYLE is  used to  you to  capture the  current values
              in  the RPYLSTP  file in  TAASECURE.   Replace  them with
              the TAA RPLRPYLE command.

         --   Edit descriptions.   As part  of SAVCHG23,  the TAA  tool
              CVTEDTD is used to  you to capture the current  values in
              the EDTDP  file in TAASECURE.  Replace  them with the TAA
              RPLEDTD command.

         --   Network  attributes.  As  part of SAVCHG23,  the TAA tool
              CAPNETA is used to  you to capture the current  values in
              the NETATTR  data area in  TAASECURE.  Replace  them with
              the TAA RTNNETA command.

         --   PTFs.   Save files should  exist in QGPL to  allow you to
              reapply.

         --   Service attributes

By successfully using this approach,  your system would be restored  to
the last SAVCHG23 occurrence.

See the  next section  for how  journaling can  bring you  closer to  a
real time solution.

Journaling
----------

One  of the uses of  journaling is to  allow you to recover  to a point
which is closer than last nights  backup.  Assuming you are  journaling
your  critical files,  there  are several  solutions  for handling  the
journals.

  **   High  Availability  solutions.    Several vendors  support  high
       availability  solutions.   The  best  TAA solution  is APYRMTJRN
       which will allow  you to apply the  journal entries to a  remote
       system.   APYRMTJRN does not support  all of the  functions of a
       complete  high availability  solution, but does  support changes
       to  data  base   records.    See   the  tool  documentation   to
       understand APYRMTJRN's function and limitations.

  **   Journal  receiver in  an  ASP.   If  you do  not  have a  remote
       system, you  should consider placing the  journal receivers in a
       user ASP.   In the event  of a system disaster,  it is  unlikely
       that you  will lose  both the  system ASP  and user  ASPs.   The
       Backup  and  Recovery Guide  describes  how  to  recover if  the
       system ASP is lost, but the user ASP is still usable.

  **   If  you do not  have a user ASP  capability, you should consider
       getting the journal  receivers off line periodically  during the
       day.  The  simplest solution would be to  periodically change to
       a new receiver and then fully backup the old receiver.

SAVCHG23  supports the OBJJRN  parameter which defaults  to *NO meaning
objects  being  journaled  will  not  be  saved.    Since  any  journal
receivers that  are changed will be  saved, this allows  for reasonable
recovery  strategy by  applying journal  entries.   Saving  the objects
that are  being journaled  provides a  simpler recovery  strategy,  but
increases save time.

Journal receivers and SAVCHG23
------------------------------

Journal receivers that have changed are saved by SAVCHG23.

A reasonable strategy is  to use the TAA tool  MTNALLJRN before running
SAVCHG23  and specifying  GENNEWRCVR(*YES).   This  will close  out the
current  receivers  and  allow  a complete  save  of  the  fully closed
receivers.

Following SAVCHG23, you could  run MTNALLJRN with DLTOLDRCVR(*YES)  and
RETAINDAYS(nn)  to delete the  receivers that  are past  your retention
period.

Save While Active
-----------------

SAVCHG23   supports   the  save-while-active   function   by  providing
parameters on the command.   However, the function is not as  effective
as it might appear.

Internally,  the SAVCHG23  function  uses  multiple commands  to  cause
different saves.

SAVSECDTA and  SAVCFG will occur without  any use of save-while-active.

SAVCHGOBJ is used  with LIB(*ALLUSR).   SAVCHGOBJ will  send a  message
(CPI3712)  when the  save-while-active checkpoint  is  complete.   This
occurs during  SAVCHGOBJ processing and before all  objects are written
to  the media.  The SAVCHGOBJ command  must go to completion before the
next  command can  be  run.   Therefore,  the  SAVDLO and  SAV  command
functions  will  not  begin  until  the  SAVCHGOBJ  saved  objects  are
completely  written to  media.  SAVCHG23  sends a  message (TAA9891) to
the  message  queue  you  specified  when  the  SAVCHGOBJ  command   is
complete.

The  SAVDLO  command  does  not  support  a  SAVACTMSGQ  parameter  (no
message is  sent by the system when  SAVDLO completes).  SAVCHG23 sends
a message  (TAA9892)  to  the  message queue  you  specified  when  the
SAVDLO function is complete.

When the  SAV  command completes,  the system  sends  the same  CPI3712
message  as  used  with  SAVCHGOBJ  to  the  specified  message  queue.
SAVCHG23  sends a message (TAA9893) to  the message queue you specified
when the SAV function is complete.

Neither the  SAVDLO command  nor the  SAV  command support  all of  the
values that  may be specified for  the SAVCHG23 SAVACT  parameter.  The
following translation occurs.

          SAVCHG23      SAVCHGOBJ       SAVDLO          SAV
        SAVACT Parm    SAVACT Parm    SAVACT Parm    SAVACT Parm
        -----------    -----------    -----------    -----------

          *NO            *NO             *NO            *NO
          *LIB           *LIB            *YES           *SYNC
          *SYNCLIB       *SYNCLIB        *YES           *SYNC
          *SYSDFN        *SYSDFN         *YES           *YES

Restart
-------

A  restart  capability  exists if  the  command  fails  after partially
completing a  save.   The restart  parameter allows  you  to begin  the
save at different points:


        Value       Description
        -----       -----------

        *NO         No restart.  All functions are used

        *FIRST      SAVSECDTA and SAVCFG are bypassed.
                      SAVCHGOBJ begins at first library
                      SAVDLO and SAV (for IFS) will occur

        lib name    SAVSECDTA and SAVCFG are bypassed.
                      SAVCHGOBJ begins at the named library
                      SAVDLO and SAV (for IFS) will occur

        *DLO        SAVSECDTA, SAVCFG, and SAVCHGOBJ are bypass
                      SAVDLO and SAV (for IFS) will occur

        *IFS        SAVSECDTA, SAVCFG, SAVCHGOBJ, and SAVDLO
                         are bypassed
                      SAV (for IFS) will occur

SAVCHG23 escape messages you can monitor for
--------------------------------------------

      TAA9891    Some error occurred

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

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

   DEV           A list  of one  or two  devices to be  saved to.   The
                 devices  are  passed  thru  to  the  DEV parameter  on
                 various  save  commands.     When  one  of  the   save
                 commands completes,  the current device  is determined
                 and  used  as  the  first  device for  the  next  save
                 command.     For   more  information,   see  the  same
                 parameter on the SAVLIB command.

   VOL           The volume  to  write on.    The default  is  *MOUNTED
                 meaning any volume that is mounted.

                 A list  of up to 75 volume  IDs may be entered.   If a
                 volume  ID  is entered,  the operator  must  mount the
                 correct volumes in  sequence.   When one  of the  save
                 commands   completes,  the   current   volume  ID   is
                 determined and  used as the first  volume for the next
                 save command.   If  the  operator overrides  a  system
                 prompt for a  specific volume ID, any  remaining mount
                 messages will  use the default of *MOUNTED.   For more
                 information,  see  the  same parameter  on  the SAVLIB
                 command.

   BYPASS        A list  of up  to  300 libraries  (or generic  library
                 names) that  will be bypassed.  This  assumes that you
                 have   your  own  recovery   strategy  for  the  named
                 libraries.

   SEQNBR        The sequence  number  to start  the  save  operations.
                 The default is  1.  A specific sequence  number may be
                 entered   in   a   range  of   1-99999.      For  more
                 information, see  the  same parameter  on  the  SAVLIB
                 command.

   ENDOPT        The end  operation  for the  device.   The default  is
                 *REWIND.   *LEAVE  or *UNLOAD  may also  be specified.
                 For  more information,  see the same  parameter on the
                 SAVLIB command.

   CLEAR         Whether to  clear the  files on  the volume  beginning
                 at  the  sequence  number  described.   *NONE  is  the
                 default  meaning no  active  data is  cleared.   If an
                 active file is  encountered, an  inquiry message  will
                 result.

                 *ALL   may   be   specified  to   clear   all   files.
                 Expiration dates will not be considered.

                 The  following values are  the same  as various SAVxxx
                 commands.    For  more   information,  see  the   same
                 parameter on the SAVLIB command.

                 *AFTER may be  specified to clear all files  after the
                 first  volume.   An inquiry  message occurs  if active
                 files exist on the first volume.

                 *REPLACE  may  be  specified to  clear  all  files the
                 same as *ALL.

   ACCPTH        Whether to save access  paths or not.  The  default is
                 *SYSVAL which  uses the  contents of the  system value
                 QSAVACCPTH (system default causes *YES).

                 *YES  may be  specified to save  access paths.   A *NO
                 entry does not save the access paths.

   QDTA          Whether to save data queue  data or not.  The  default
                 is *NONE meaning no data queue data will be saved.

                 *DTAQ may  be specified  to save  the data  queues and
                 their  data.   An object  will exist  in the  save for
                 each data queue.

   RESTART       Whether this is a restart  situation.  The default  is
                 *NO meaning  that all save  functions of  SAVCHG23 are
                 used.

                 If you need to restart, the following may be used.

                 *FIRST may  be used to start at  the first library for
                 SAVCHGOBJ.   The  SAVSECDTA and  SAVCFG functions will
                 not be  run.   The  SAVDLO and  SAV  commands will  be
                 run.

                 A  specific library  name  may be  used  to start  the
                 SAVCHGOBJ  function  at a  library  (the  library must
                 exist).  The SAVSECDTA  and SAVCFG functions will  not
                 be run.  The SAVDLO and SAV commands will be run.

                 *DLO may  be entered to start  the save at  the SAVDLO
                 function.     The  SAVSECDTA,  SAVCFG,  and  SAVCHGOBJ
                 functions will not be  run.  The  SAV command will  be
                 run.

                 *IFS may  be  entered to  start the  save  at the  SAV
                 command function.   The SAVSECDTA,  SAVCFG, SAVCHGOBJ,
                 and SAVDLO functions will not be run.

   EXPDATE       The  expiration date to be  used for the output media.
                 The default  is  *DAY3 which  means  3 days  from  the
                 current date.

                 *PERM may be entered to make the file permanent.

                 The  special values *DAY1,  *DAY2 ...   *DAY60  may be
                 entered  to cause an expiration  date of 1,  2 ...  60
                 days from today.

                 A specific  date entered  in job  format  may also  be
                 used.

   DTACPR        Whether to use  data compress.  The  values are passed
                 thru   to  the  SAVLIB   command.     For  a  complete
                 understanding  of  the   parameter,  see  the   SAVLIB
                 command.

                 The default is *YES to compress the data.

                 *NO  may  be  specified  so  the   data  will  not  be
                 compressed.

                 *LOW may be specified to compress to a low degree.

                 *MEDIUM  may  be specified  to  compress  to a  medium
                 degree.

                 *HIGH  may be specified to  compress to a high degree.

   OBJJRN        A  *YES/*NO  parameter for  whether  to  save  objects
                 that are  being journaled.   The default is  *NO which
                 assumes  you   will  recover  by  restoring  from  the
                 SAVLIB LIB(*NONSYS) version  and applying the  journal
                 entries.

                 *YES  may  be  specified to  save  the  objects  being
                 journaled.     Saving  the  objects   that  are  being
                 journaled provides  a simpler  recovery strategy,  but
                 increases save time.

   REFDATE       The  reference date  to  be used  to  determine if  an
                 object  should  be saved  based  on  its change  date.
                 The  default is *NONSYS which  normally means the date
                 that you  last  performed  a Save  Change  21  Option.
                 This can only  be assumed based on the  last save date
                 of  the QSAVLIBALL data  area in QSYS.   Note that the
                 QSAVALLUSR and  QSAVIBM  data areas  are  not  updated
                 even   though   they   are    a   subset   of   SAVLIB
                 LIB(*NONSYS).

                 *ALLUSR  may be entered to  mean the date  of the last
                 SAVLIB LIB(*ALLUSR).

                 A specific date may be entered in job format.

                 If you have done a  SAVLIB LIB(*NONSYS) after the  the
                 Save Change  Option 21,  you should consider  entering
                 a  date.   The safe  date to  use is  the date  of the
                 last Save Change 21 Option.

                 The  date  determined  (or entered)  is  used  for all
                 SAVxxx commands.

   REFTIME       The reference  time  to be  used  to determine  if  an
                 object  should  be saved  based  on  its change  time.
                 The  default is *NONE.   If  you use REFDATE(*NONSYS),
                 the reference  time  will  be  the save  time  of  the
                 QSAVLIBALL  data  area.   See  the  comments  for  the
                 REFDATE parameter and this data area.

                 A specific time may be entered in hhmmss format.

                 If  REFDATE(*NONSYS) is  used, REFTIME(*NONE)  must be
                 specified.    If  a  date  is  used  for  REFDATE,   a
                 specific time must be entered for REFTIME.

                 The  time determined  (or  entered)  is used  for  all
                 SAVxxx commands.

   UPDHST        A  *YES/*NO  option for  whether  to  update the  save
                 history  information for  each object saved.   *YES is
                 the default.

                 *NO may be  specified to bypass  updating of the  save
                 history.

   SAVACT        An  option to determine  if an  object can  be updated
                 while  the  save  is  running.    The  default is  *NO
                 meaning the  objects cannot  be updated.   If  objects
                 are locked exclusively  or for update, they  cannot be
                 saved.

                 The  other  values  that  may  be  entered  are  *LIB,
                 *SYNCLIB, and *SYSDFN.  See  the SAVLIB command for  a
                 complete description of these values.

                 Not all  SAVxxx commands  support all  of the  values.
                 See  the  previous   documentation  for  how  this  is
                 handled.

   SAVACTWAIT    A  list of 3 elements  describing the save active wait
                 time:

                 The first element  is the amount  of time to wait  for
                 an  object lock.    The  default is  120  seconds.   A
                 number  between 0  and 99999  may be specified  or the
                 special value *NOMAX.   See the  SAVLIB command for  a
                 complete description of the parameter.

                 The second element  is the amount of time  to wait for
                 pending   record   changes   for   objects  that   are
                 checkpointed together.  The  default is *LOCKWAIT.   A
                 number between  0 and  99999 may  be specified or  the
                 special  values *NOMAX or  *NOCMTBDY.  See  the SAVLIB
                 command  for a complete  description of the parameter.

                 The third element  is the amount  of time to wait  for
                 transactions  with other  pending changes  to reach  a
                 commit  boundary.    The  default  is  *LOCKWAIT.    A
                 number between 0  and 99999  may be  specified or  the
                 special value  *NOMAX.  See  the SAVLIB command  for a
                 complete description of the parameter.

   SAVACTMSGQ    The  qualified  name  of  the  message  queue to  send
                 messages  to  if  SAVACT(*YES)  is  specified.     The
                 library   defaults  to   *LIBL.     *CURLIB   may   be
                 specified.

                 See  the  previous  documentation  for  messages  that
                 will be sent.

   CHKSAVRST     A  *YES/*NO option  for should the  TAA Tool CHKSAVRST
                 command be run.   The default is *YES.   The CHKSAVRST
                 command  will  produce  a  spooled  file  of  the  S/R
                 messages which have occurred during the job.

   ERRORSONLY    A  *YES/*NO option  for  should the  CHKSAVRST command
                 ERRORSONLY option  be  used.   *YES  is  the  default.
                 The default is  designed to further 'net  out' the job
                 log.   The printed  listing will  essentially take the
                 library completion  message  information and  print  a
                 summary.   If any objects  were not saved,  the detail
                 message  will  appear  in  the  job  log if  the  *YES
                 option   is   taken.     The   entry  is   ignored  if
                 CHKSAVRST(*NO) is specified.

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

The  user  of  the   command  must  be  authorize  to   the  TAASAVALLC
authorization list.

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

The following TAA Tools must be on your system:

     ADDDAT          Add date
     CHKDAT          Check date
     CHKDUPLST       Check duplicate list
     CHKGENERC       Check generic
     CHKGENOBJ       Check generic object
     CHKOBJ3         Check object 3
     CHKSAVRST       Check save/restore
     CHKTIM          Check time
     CVTDAT          Convert date
     CVTEDTD         Convert edit descriptions
     CVTRPYLE        Convert reply list entries
     CVTSYSVAL       Convert system value
     CVTTIM          Convert time
     EDTVAR          Edit variable
     EXTLST          Extract list
     EXTLST2         Extract list 2
     RSNLSTMSG       Resend last message
     RTVNONSYS       Retrieve *NONSYS library exceptions
     RTVSYSVAL3      Retrieve system value 3
     SNDESCINF       Send escape information
     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
   ------        ----    ---------      ----------    ----------

   SAVCHG23      *CMD                   TAASAVW       QATTCMD
   TAASAVWC      *PGM       CLP         TAASAVWC      QATTCL
   TAASAVWR      *PGM       RPG         TAASAVWR      QATTRPG
   TAASAVWP      *FILE      PF          TAASAVWP      QATTDDS
					

Added to TAA Productivity tools January 15, 2004


Home Page Up to Top