TAA Tools
SAVALLCHG     SAVE ALL CHANGES TO TAPE                  TAASAVC

The SAVALLCHG  command does a  SAVCHGOBJ against  all libraries on  the
system  to tape  and prints  a  summary listing.   This  allows  a good
daily  backup  for  many  systems  when  used  in  conjunction  with  a
periodic SAVLIB LIB(*ALLUSR) or LIB(*NONSYS).

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

Three commands are provided:

  **   SAVALLCHG - Saves all changed objects to tape

  **   SAVALLCHG2  - Saves  all  changed  objects to  save  files in  a
       specified library

  **   SAVALLSAVF - Saves the SAVALLCHG2 save files to tape

  **   A typical command would be entered as:

            SAVALLCHG    DEV(TAP01)  REFDATE(*ALLUSR)

       The  SAVALLCHG  function does  not require  any  additional DASD
       space, but does  require operator attendance  if a media  change
       is needed.

            SAVALLCHG2
            SAVALLSAVF   DEV(TAP01)

       The SAVALLCHG2  function does  not require  operator attendance,
       but  does   require  sufficient  DASD  space.    The  SAVALLSAVF
       function requires  operator  attendance  if a  media  change  is
       needed.

There is a  companion command to  restore from the tape  media created.
See the TAA Tool RSTALLCHG.

Comparison with SAVCHGOBJ
-------------------------

The  SAVALLCHG tool  has been left  in TAATOOL  even though  the system
supported  SAVCHGOBJ command  supports a  similar function.   The major
differences are as follows:

  **   A listing is produced  with SAVALLCHG with one line  per library
       stating  the  number  of  objects  saved and  the  number  which
       cannot  be saved.  This  provides a simple summary  of where the
       problems are if any.

  **   SAVALLCHG2 command  allows  saving  of  all  libraries  to  save
       files.  SAVCHGOBJ can only save one library to a save file.

  **   If a new library  exists, it must be saved  first with SAVLIB in
       order for  SAVCHGOBJ to operate.   SAVALLCHG recognizes the fact
       the library has never  been saved and saves  all objects.   This
       function is not available if REFDATE(*SAVLIB) is specified.

  **   SAVCHGOBJ supports  the LIB(*ALLUSR) value.   The  same function
       is supported  by SAVALLCHG.  If you  use SAVALLCHG LIB(*ALLUSR),
       you must restore with the RSTALLCHG TAA Tool.

General comments
----------------

Both  SAVALLCHG  commands assume  the  use of  standard  labeled tapes.
This is  a  requirement for  the  use of  the  RSTALLCHG command.    To
create a  standard label  tape, you must  specify the  NEWVOL parameter
on the INZTAP command.

The  SAVCHGOBJ  command allows  up to  300  libraries to  be specified.
The SAVALLCHG  command finds  the libraries  that exist  in the  system
and builds a  list of 300 at a  time.  This allows an  efficient use of
SAVCHGOBJ as  the system can better overlap  the processing time on one
library while writing out the changed objects for another library.

The SAVALLCHG2 command saves one  library at a time  to a save file  in
the specified library.   All save  files in the designated  library are
cleared at  the beginning of  the command.   This allows you  to follow
the  command with  SAVALLSAVF and have  the tape  output represent only
the changed objects on the  system (it would be a mirror image  of what
you would have have saved with SAVALLCHG).

You may  specify up to 100  library names (including generic  names) to
be  included.   This allows  a save  of specific  libraries and  may be
used if  you have  multiple  tape drives  and want  multiple  SAVALLCHG
commands to be  in operation.  If  the INCLIB parameter is  one or more
library  names, the REFDATE parameter  value is used  only to determine
a date (no libraries are included or excluded).

You may specify up  to 100 library names  (including generic names)  by
using the  BYPASS parameter  on the  SAVALLCHG commands.   This  allows
you  to tailor your  save strategy if  you have some  unique processing
for  certain  libraries.   For  example,  you  may prefer  to  save the
entire contents of  some libraries and then  use SAVALLCHG on the  rest
of the libraries.

A listing is  produced to the SAVALLCHG spooled file  with one line for
each  library.  The listing describes the  number of objects saved, not
saved (some  problem occurred  such as  an update  lock  exists on  the
object), the  create date  of the  library (if it  is greater  than the
reference  date) and  the volume  identification  of where  the objects
were saved.   If a  library is  bypassed, it  is listed  along with  an
indication that it was bypassed.

If the  INCLIB parameter  lists one  or more libraries,  those are  the
only libraries that will appear in the listing.

The  SAVALLCHG commands must  adopt the  authority of QSECOFR  in order
to  access all the  libraries (some may  be private).   The user of the
command must be authorized to the TAASAVALLC authorization list.

Which libraries are saved
-------------------------

If INCLIB  is a  list of  libraries (the value  is other  than *ALL)  a
REFDATE special  value (such  as *ALLUSR) is  used only to  determine a
date and time (not the libraries to be saved).

When  INCLIB is not *ALL, a list  of bypass libraries may be specified.
For example,  INCLIB(A*)  and  BYPASS(ABC)  would  save  all  libraries
beginning with A except for ABC.

If  REFDATE(*ALLUSR)  is  specified,  certain #  and  Q  libraries  are
bypassed.   See the  SAVLIB command LIB  parameter for a  discussion of
what libraries are bypassed.

All other REFDATE values  bypass the same  libraries that are  bypassed
by a  SAVLIB(*NONSYS).   For example,  QSYS and  QRPLOBJ are  bypassed.
The Backup  and Recovery Guide describes certain  system libraries that
will not be saved if you specify SAVLIB LIB(*NONSYS).

If  you want to bypass additional  libraries, use the BYPASS parameter.

No corresponding  function exists  for  SAVLIB LIB(*IBM).   The  reason
for  this  is  that PTFs  may  be  applied  to system  libraries  which
contain  code and this would  cause objects to be  saved.  However, the
PTF index is only saved by  a SAVLIB command.  Consequently, a  restore
of SAVCHGOBJ media would  make the library and the  index out of synch.
You should retain your PTFs until the next full library save.

Reference date and time
-----------------------

You  may specify a  reference date or  use the special  values *NONSYS,
*ALLUSR, or *SAVLIB.   If *NONSYS  or *ALLUSR are used,  the last  date
of the  corresponding function for  SAVLIB (e.g.   SAVLIB LIB(*NONSYS))
is used.   These values  come from Qxxx  data areas kept  in QSYS which
are updated when the full save occurs.

If  *SAVLIB  is  specified, the  last  date  for each  full  save  of a
library is used.

If a  special  value is  entered for  REFDATE, you  may  not specify  a
reference time.

You may enter your own reference date and time if needed.

Expiration date
---------------

The SAVALLCHG  commands are designed to  be used with a  media rotation
method.   For  example, assume you  have three  sets of  media that you
rotate  for  backup.    The  command  defaults  are  set  to  allow  an
expiration date  of 3 days  from the day of  entry.  This  prevents the
operator from  making a gross mistake (such  as continuous saves to the
same media),  but still  requires  the operator  to mount  the  correct
volumes.

If you  have  a set  of media  for each  day  of the  week, you  should
change the default or specify the proper value.

Volume ID
---------

The  VOL parameter is  supported on  both the SAVALLCHG  and SAVALLSAVF
commands.   The  default is  *MOUNTED which is  the same  as the normal
Save commands.

A 4 character volume ID can  be entered in which case the  command will
append 01, 02...50.   For example, if you specify  ABCD, the volume IDs
requested   will  be  ABCD01,   ABCD02...ABCD50.    If   you  use  this
technique, you  must  initialize your  volumes with  the  corresponding
names.  Note  that you must enter  4 characters (ABC cannot  be used as
it is only 3 characters).

The  advantage of this approach  is to assist the  operator in mounting
the correct  tapes  and in  the  correct  sequence.   The  system  save
commands  will  ensure  the names  match  and  the  volumes  appear  in
sequence (Not  all 50 must appear).   If an error occurs,  a message is
sent to QSYSOPR.

If  you use a media  rotation method, you would want  to name the first
set SETA  and  the  2nd SETB  or  some such  method.   You  can  either
require  the operator  to enter  the 'set  name' on  the  provided Save
commands  or you could  place the commands  in a CL  Program and prompt
the operator for the name of the  set to be used.  The TAA Tool  PMTOPR
could be used to  help ensure that the operator  was entering a correct
set name.

SAVALLCHG  also supports the VOLID  parameter to allow  a specific list
of Volume IDs to be entered if VOL(*VOLLIST) is specified.

The advantages of  expiration date  and Volume  ID are  to help  ensure
that the  operator  is using  the correct  media.   Neither, either  or
both techniques may be used.

Considerations
--------------

Some  defaults are changed  from the  normal SAVCHGOBJ command.   These
are described in the command parameters.

During  processing  of either  SAVALLCHG  command, status  messages are
sent to  the external  message queue to  inform the  operator of  which
library is  being saved.  Because  of the way  SAVCHGOBJ functions, you
may  see  messages  stating that  a  library is  being  saved  when the
system is actually saving a previous library to media.

If any objects  cannot be saved  or any other  errors occur during  the
processing, the commands will end with a CPF9898 escape message.

An option exists on  all of the commands which defaults to  *YES to run
the  CHKSAVRST  command.   This command  will  produce a  listing  to a
spooled file for all  the S/R messages which  have occurred during  the
job.

SAVALLCHG2 will  create save files  if the a  library to be  saved does
not  have a  corresponding  save file  in  the specified  library.   If
BGNLIB  is *FIRST, all  the save files  are cleared.   If a library was
saved and has since been  deleted, an empty save file will  exist after
the  next successful  use  of SAVALLCHG2.    Periodically clearing  the
library of save files will allow a refresh to occur.

SAVALLCHG     Save all changes directly to tape       *CMD
---------     ---------------------------------

The SAVALLCHG command saves all changes directly to tape.

If  the command is interrupted, recovery  can be achieved by specifying
the library name to  begin with on the BGNLIB  parameter.  You can  use
the job  log to determine the  last library which was  correctly saved.

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

   DEV           This  is  the  same parameter  as  on  SAVCHGOBJ.   It
                 supports a list of up to 2 devices.

   VOL           This is similar  to the same  parameter on  SAVCHGOBJ.
                 The  default  of  *MOUNTED  is  the  same  meaning  to
                 ignore  the volume  ID  on the  tape.   A  4 character
                 entry  may be made to describe  a set of volumes.  (If
                 you  enter  other   than  *MOUNTED,   it  must  be   4
                 characters).   A  two  digit sequence  number will  be
                 appended  to   the  name  given.    See  the  previous
                 discussion of Volume ID.

                 The special value *VOLLIST  may be entered to  specify
                 that a  list of  Volume IDs is  being provided  in the
                 VOLID parameter.

   VOLID         The  default is *NONE  meaning that  the VOL parameter
                 determines the Volume IDs  to be used.   A list of  up
                 to 40  Volume IDs may  be entered if  VOL(*VOLLIST) is
                 specified.

   INCLIB        A list  of up to 100 library  names (or generic names)
                 that  will be saved.  The  default is *ALL meaning all
                 libraries are considered.

                 This parameter  is helpful if  you have multiple  tape
                 devices and  want to have  multiple SAVALLCHG commands
                 running.

                 When  one or more libraries  are specified for INCLIB,
                 a REFDATE special value such  as *ALLUSR is used  only
                 to determine  a reference date  and time (it  does not
                 control the libraries to be saved).

                 The BYPASS  parameter may be used  in conjunction with
                 INCLIB.    For  example  INCLIB(A*)  and   BYPASS(ABC)
                 would save all  libraries beginning with A  except for
                 ABC.

   BYPASS        The library  names (or generic names)  to be bypassed.
                 *NONE   is  the  default.    If  you  have  some  test
                 libraries  or a  different  save  strategy  for  other
                 libraries  that you  do not  want saved,  enter  up to
                 100 names.

                 Some  libraries  are  implicitly  bypassed.    See the
                 REFDATE parameter.

   LIBTYPE       The type  of library  to  be saved.   The  default  is
                 *ALL for any library type.

                 *PROD  may  be  specified   to  save  only  production
                 libraries (TYPE of PROD).

                 *TEST  may   be  specified  to  save  only  production
                 libraries (TYPE of TEST).

   SEQNBR        The sequence number  of the first  file.  The  default
                 is  1  which  differs from  the  normal  SAV  commands
                 which use a default of *END.

   EXPDATE       The  expiration date  of  the  tape.   The  default is
                 *DAY3  which differs from the  SAVCHGOBJ default.  The
                 special values *PERM or  *DAY1, *DAY2 ...   *DAY60 may
                 be  entered or  a specific  date.   The  *DAYnn values
                 mean  to add a number  of days to the  current date as
                 the expiration  date.   For  example, *DAY3  causes  a
                 expiration date of 3 days in the future.

                 If  a specific  date is  entered,  it must  be in  job
                 format  and is checked  to ensure  that it is  a valid
                 date between tomorrow and one year from today.

   SAVSECDTA     Whether to use  the SAVSECDTA  command before  saving.
                 The  default  is  *NO.     SAVSECDTA  saves  the  user
                 profiles  and authorizations  that are  normally saved
                 by   the  SAVSYS   command.    The   file  created  is
                 QFILEUPR.   It  cannot be  restored by  the  RSTALLCHG
                 command.   The file must be restored  by the RSTUSRPRF
                 command.

   SAVCFG        Whether  to  use  the  SAVCFG  command  before saving.
                 The default is  *NO.   The configuration  is saved  to
                 the  file QFILEIOC  which can  be used  by the  RSTCFG
                 command to restore the configuration.

   OBJJRN        Whether   journaled  files  should  be   saved.    The
                 default is *NO.   If you are  not journaling, you  may
                 want to specify  *YES to ensure that if  journaling is
                 started as  a debugging or  problem determination aid,
                 that you continue to save the full file.

   REFDATE       The  reference  date to  use  for saving  the changes.
                 The default  is *NONSYS which  means save any  changes
                 from the last time a SAVLIB LIB(*NONSYS) was done.

                 *ALLUSR,  *SAVLIB,   or  a  specific   date  (use  job
                 format) may be entered.

                 When  INCLIB  is not  *ALL,  a special  value  such as
                 *ALLUSR only  determines the  reference date/time  and
                 does  not  control  which  libraries  are  saved  (the
                 libraries  to be  saved are  determined by  the INCLIB
                 parameter).

                 The special  values *ALLUSR  or *NONSYS,  or may  only
                 be  used if  you have  done  the corresponding  SAVLIB
                 command.

                 A  value of *ALLUSR  has the  same definition  as that
                 used  by  the  system  SAVLIB  LIB(*ALLUSR)  function.
                 See the help text  for SAVLIB.  This bypasses  certain
                 #  libraries and  all  Q libraries  except those  that
                 are  specifically described in  the help  text such as
                 QGPL.

                 If  the  REFDATE   value  is   not  *ALLUSR,   certain
                 libraries  are bypassed  based  on  the definition  of
                 the  SAVLIB  LIB(*NONSYS)  function.    This  bypasses
                 libraries such as QSYS, QRPLOBJ, and QSPL.

                 When *SAVLIB  is  specified, any  new  libraries  that
                 have not  been previously  saved by  a SAVLIB  command
                 cannot be saved by SAVALLCHG (an error is noted).

   REFTIME       The  reference  time.    The  default  is  *NONE.    A
                 specific  time may  also be  specified.   If a special
                 value is entered  for REFDATE, REFTIME(*NONE)  must be
                 specified.

   ENDOPT        Whether  to  rewind  the   tape  at  the  end  of  the
                 command.   The default is *REWIND.   *LEAVE or *UNLOAD
                 can be specified.   The  option you  specify does  not
                 take  affect  until  the  last  SAVCHGOBJ  command  is
                 issued.   Only  300 libraries  may  be specified  on a
                 single SAVCHGOBJ  command  so  it  may  take  multiple
                 commands to save the  entire system.  For all  but the
                 last  SAVCHGOBJ command, ENDOPT(*LEAVE)  is specified.

   UPDHST        Whether    to   update    the   Save/Restore   history
                 information.   *YES  is  the  default  to  update  the
                 information.

                 *NO may  be specified  to not update  the information.

   CLEAR         Whether  to clear  the files  on the  volume beginning
                 at  the  sequence  number  described.    *ALL  is  the
                 default to  clear all  files.   Expiration dates  will
                 not be considered.

                 *NONE  may be specified to  check the expiration dates
                 of any existing files on the media.

                 *AFTER may be specified to  clear all files after  the
                 first volume.   An  inquiry message  occurs if  active
                 files  exist  on  the   first  volume.    For  a  more
                 complete definition, see the SAVLIB command.

                 *REPLACE  may  be  specified to  clear  all  files the
                 same as  *ALL.   For a more  complete definition,  see
                 the SAVLIB command.

   SAVACT        Whether  to do a  'save while  active' function.   The
                 default  is *NO.   *LIB, *SYNCLIB, and  *SYSDFN may be
                 specified.    These   are  the   same  values  as   on
                 SAVCHGOBJ.

   SAVACTWAIT    A 3 part  parameter that is the same  as on SAVCHGOBJ.
                 The  first part is  the amount of  time to wait  for a
                 lock to be  placed on an  object.  A  value between  0
                 and 99999 may be specified or *NOMAX.

                 The second  part is  for the  amount of  time to  wait
                 for   pending  record   changes.     The   default  is
                 *LOCKWAIT.    A  value  between  0  and  99999  may be
                 specified, or *NOMAX, or *NOCMTBDY.

                 The third part is for  the amount of time to  wait for
                 transactions   with  other   pending  changes.     The
                 default  is *LOCKWAIT.   A  value between 0  and 99999
                 may be specified or *NOMAX.

   SAVACTMSGQ    The save  active message  queue.   The qualified  name
                 of a message  queue to send messages to.   The default
                 is  *NONE.  The  library qualifier  defaults to *LIBL.
                 See the discussion of this parameter on SAVCHGOBJ.

   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.

   SAVFDTA       Whether  to save  the SAVF  object data.   The default
                 is  *YES.   An  entry  of  *NO  will  cause  the  SAVF
                 objects to be saved without the save file data.

   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.

   COMPACT       Whether to use device compaction.

                 *DEV is  the default to  use device  compaction if  it
                 exists.   See  the  discussion of  the same  parameter
                 for  SAVOBJ for how  how it works  in conjunction with
                 DTACPR.

                 *NO may be specified to avoid device compaction.

   BGNLIB        Beginning  library  to  start  at.    The  default  is
                 *FIRST.   This is designed  as a recovery  function to
                 allow   a  restart   if   the  SAVALLCHG   command  is
                 interrupted.   The value  entered is  used to  compare
                 against  each library  name  on the  system.   If  the
                 library name  is less than  the value, the  library is
                 ignored  and will  appear in  the SAVALLCHG  output as
                 bypassed.

                 Specifying a beginning library  may also be used  as a
                 testing function.

   OMITOBJ       Whether to  omit objects from  the save.   By default,
                 no objects are omitted.

                 A  list of  100 objects may  be entered.   The default
                 library value  is *LIBL  and  default object  type  is
                 *ALL.

   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  all the  S/R
                 messages which  have occurred  during the  job.   When
                 the  SAVALLCHG command begins  and ends, a  message is
                 sent  to the job  log with the  CPF9898 message.  This
                 will be picked up  by the CHKSAVRST command to  assist
                 you  in  determining  which  messages  belong  to  the
                 SAVALLCHG command.

   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.

   OUTPUT        Whether  a  list   of  information  about   the  saved
                 objects  should  be  output  to  a print  file  or  an
                 output  file.  This applies  to the SAVSECDTA, SAVCFG,
                 and SAVCHGOBJ functions.  The  default is *NONE.   See
                 also   the  INFTYPE   parameter   for  the   SAVCHGOBJ
                 function.

                 *PRINT  may be specified  to output to  a spooled file
                 named QPSAVOBJ.    A  separate file  is  produced  for
                 SAVSECDTA,  SAVCFG, and  each  time SAVCHGOBJ  is  run
                 (up to 300 libraries per SAVCHGOBJ).

                 *OUTFILE  may  be  specified  to  output to  the  file
                 named in the OUTFILE parameter.

   OUTFILE       The  name  of  the  file  to  be  used  for  output if
                 OUTPUT(*OUTFILE) is  specified.  This  applies to  the
                 SAVSECDTA,  SAVCFG,  and  SAVCHGOBJ  functions.    The
                 model  file used  is  QASAVOBJ in  QSYS with  a format
                 name of QSRSAV.

                 The file will be created  if it does not exist in  the
                 named library.   The  qualified library  name defaults
                 to  *LIBL, but requires  that the file  exist with the
                 same  format  as  QASAVOBJ.    *CURLIB  may  also   be
                 specified.

   OUTMBR        A  2 part  parameter  that  specifies the  member  and
                 whether    the   member    is    cleared    first   if
                 OUTPUT(*OUTFILE)  is specified.   This  applies to the
                 SAVSECDTA, SAVCFG, and SAVCHGOBJ functions.

                 The first  part of  the parameter is  the member  name
                 which defaults  to *FIRST.   A specific member  may be
                 named.

                 The  second part  of the parameter  determines whether
                 the  member  is  cleared   first.    The  default   is
                 *REPLACE meaning  the existing  data is  cleared first
                 before  writing data.  The  value is used  only on the
                 first save function.   The *ADD  function is used  for
                 any additional save functions.

                 *ADD may  be specified  to add  records to the  output
                 member.

   INFTYPE       The   type   of   information   that  is   output   if
                 OUTPUT(*PRINT)   or  OUTPUT(*OUTFILE)   is  specified.
                 This applies only to the SAVCHGOBJ function.

                 *OBJ is  the default  and  outputs a  record for  each
                 object and library saved.

                 *LIB  may be  specified to  output a  record  for each
                 library saved.

                 *MBR  may be  specified  to output  a record  for each
                 library  and  object  saved  along  with  any  members
                 saved for each object.

                 *ERR  may be  specified to  output a  record for  each
                 library  and object that was  successfully saved along
                 with command information.

SAVALLCHG2       Save all changes to save files       *CMD
----------       ------------------------------

The SAVALLCHG2 command outputs the changed  objects to save files.   If
the save file does not  exist in the named library, it  is created with
MAXRCDS(*NOMAX).   You can create the save file  yourself and specify a
MAXRCDS  value to  restrict the  size of  the save  file.  If  the save
data exceeds  the MAXRCDS  value, an exception  is noted  and the  next
library is saved.

All save  files in the specified  library are cleared at  the beginning
of  the  command  (unless  BGNLIB  is  used).    This  allows  for  the
SAVALLSAVF command to produce  a tape which will  be the equivalent  of
the  SAVALLCHG command  (i.e.    it will  contain  all  of the  changed
objects on the system from the last reference date).

If the  SAVALLCHG2 command is interrupted, recovery  can be achieved by
specifying the BGNLIB  parameter to  determine which  library to  begin
at.  This support  assumes that you have already  issued the SAVALLCHG2
command  and  some  libraries  were  saved  and  that  an  interruption
occurred.   If BGNLIB is  specified, the save files  are not cleared at
the beginning of the command.

You can determine from  the job log, the  library which was last  saved
correctly.

The default  is to  always use software  data compression.   This helps
conserve the DASD size requirements.

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

   SAVFLIB       The  library containing the  save files.   The default
                 is SAVFLIB.    To  use  the default,  you  must  first
                 create the SAVFLIB library.

   INCLIB        A list of  up to 100 library names  (or generic names)
                 that will  be saved.  The default  is *ALL meaning all
                 libraries are considered.

                 This parameter is  helpful if you  have multiple  tape
                 devices and want  to have multiple  SAVALLCHG commands
                 running.

                 When one  or more libraries are  specified for INCLIB,
                 a  REFDATE special value such  as *ALLUSR is used only
                 to determine a  reference date and  time (it does  not
                 control the libraries to be saved).

                 The BYPASS  parameter may be used  in conjunction with
                 INCLIB.     For  example  INCLIB(A*)  and  BYPASS(ABC)
                 would save all libraries  beginning with A except  for
                 ABC.

   BYPASS        The library names  (or generic names) to  be bypassed.
                 *NONE  is  the   default.    If  you  have  some  test
                 libraries or  a  different  save  strategy  for  other
                 libraries that  you  do not  want saved,  enter up  to
                 100 names.

                 Some  libraries  are  implicitly  bypassed.   See  the
                 REFDATE parameter.

   LIBTYPE       The  type  of library  to be  saved.   The  default is
                 *ALL for any library type.

                 *PROD  may  be  specified  to  save   only  production
                 libraries (TYPE of PROD).

                 *TEST  may  be  specified   to  save  only  production
                 libraries (TYPE of TEST).

   SAVSECDTA     Whether  to use  the SAVSECDTA command  before saving.
                 The  default  is  *NO.    SAVSECDTA  saves   the  user
                 profiles and  authorizations that  are normally  saved
                 by  the  SAVSYS command.    The save  file  created is
                 QFILEUPR.    It  will  be  saved  by  the   SAVALLSAVF
                 command.    The   file  cannot  be  restored   by  the
                 RSTALLCHG command.   The file must be  restored by the
                 RSTUSRPRF command.

   SAVCFG        Whether  to  use  the  SAVCFG  command  before saving.
                 The default  is *NO.   The configuration  is saved  to
                 the  file QFILEIOC  which can  be used  by  the RSTCFG
                 command to restore the configuration.

   OBJJRN        Whether   journaled  files  should  be   saved.    The
                 default is *NO.   If you are  not journaling, you  may
                 want to specify  *YES to ensure that  if journaling is
                 started  as a debugging or  problem determination aid,
                 that you continue to save the full file.

   REFDATE       The reference  date to  use  for saving  the  changes.
                 The default  is *NONSYS which  means save  any changes
                 from  the last  time  a SAVLIB  LIB(*NONSYS)  was done
                 (See the later discussion).

                 *ALLUSR  or  *SAVLIB may  also be  used or  a specific
                 date (use job format).

                 When INCLIB  is  not *ALL,  a  special value  such  as
                 *NONSYS  only determines  the reference  date/time and
                 does  not  control  which  libraries  are  saved  (the
                 libraries to  be saved  are determined  by the  INCLIB
                 parameter).

                 The  special values  *ALLUSR  or *NONSYS  may only  be
                 used  if   you  have  done  the  corresponding  SAVLIB
                 command.

                 A value of  *ALLUSR has  the same  definition as  that
                 used  by  the  system  SAVLIB  LIB(*ALLUSR)  function.
                 See the  help text for SAVLIB.   This bypasses certain
                 #  libraries  and all  Q  libraries except  those that
                 are specifically  described in the  help text such  as
                 QGPL.

                 If  the   REFDATE  value   is  not   *ALLUSR,  certain
                 libraries  are  bypassed based  on  the  definition of
                 the  SAVLIB  LIB(*NONSYS)  function.    This  bypasses
                 libraries such as QSYS, QRPLOBJ, and QSPL.

                 If  *SAVLIB   is  specified,   the  library   will  be
                 bypassed  if it has never  been saved.   An error will
                 appear on the printed output.

   REFTIME       The  reference  time.    The  default  is  *NONE.    A
                 specific time  may also be  specified.  If  REFDATE is
                 specified  as  *NONSYS   or  *SAVLIB,  this  value  is
                 ignored.

   UPDHST        Whether    to   update    the   Save/Restore   history
                 information.   *YES  is  the  default  to  update  the
                 information.

                 *NO may  be specified  to not update  the information.

   SAVACT        Whether  to do  a 'save  while active' function.   The
                 default is *NO.   *LIB, *SYNCLIB,  and *SYSDFN may  be
                 specified.     These  are   the  same  values   as  on
                 SAVCHGOBJ.

   SAVACTWAIT    A 3  part parameter that is the  same as on SAVCHGOBJ.
                 The first part  is the amount  of time to  wait for  a
                 lock to  be placed on  an object.   A value between  0
                 and 99999 may be specified or *NOMAX.

                 The  second part  is for  the amount  of time  to wait
                 for   pending   record  changes.     The   default  is
                 *LOCKWAIT.    A value  between  0  and  99999  may  be
                 specified, or *NOMAX, or *NOCMTBDY.

                 The third part  is for the amount of  time to wait for
                 transactions   with  other   pending  changes.     The
                 default is *LOCKWAIT.   A  value between  0 and  99999
                 may be specified or *NOMAX.

   SAVACTMSGQ    The save  active message  queue.   The qualified  name
                 of a  message queue to send messages  to.  The default
                 is *NONE.   The library qualifier  defaults to  *LIBL.
                 See the discussion of this parameter on SAVCHGOBJ.

   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.

   SAVFDTA       Whether to save  the SAVF  object data.   The  default
                 is  *YES.    An  entry of  *NO  will  cause  the  SAVF
                 objects to be saved without the save file data.

   DTACPR        Whether  to use  data compress.   The default  is *YES
                 to  help  conserve  DASD  space  requirements.    This
                 differs from the normal SAV command default.

   BGNLIB        Beginning  library  to  start  at.    The  default  is
                 *FIRST.   This is designed  as a recovery  function to
                 allow   a  restart   if  the   SAVALLCHG2  command  is
                 interrupted.  If  a value is  entered, all save  files
                 will not  be cleared at the beginning  of the command.
                 The  value  entered is  used to  compare  against each
                 library name on  the system.  If  the library name  is
                 less than the  value, the library is  ignored and will
                 appear  in the  SAVALLCHG 2  output  as bypassed.   If
                 the value  is  equal  or greater,  the  save  file  is
                 cleared.  The  library is tested  to see if  it should
                 be bypassed and if not, a save is attempted.

                 Specifying a  beginning library may also be  used as a
                 testing function.

   OMITOBJ       Whether  to omit objects  from the save.   By default,
                 no objects are omitted.

                 A list  of 100 objects  may be  entered.  The  default
                 library  value is  *LIBL  and default  object type  is
                 *ALL.

   CHKSAVRST     A  *YES/*NO option for  should the  TAA Tool CHKSAVRST
                 be run.  The default  is *YES.  The CHKSAVRST  command
                 will  produce  a  listing to  the  SAVALLCHG2  spooled
                 file  of  all  the S/R  messages  which  have occurred
                 during the job.   When the  SAVALLCHG2 command  begins
                 and ends, a  message is sent  to the job log  with the
                 CPF9898  message.   This  will  be  picked  up by  the
                 CHKSAVRST  command to assist  you in determining which
                 messages belong to the SAVALLCHG2 command.

   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.

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

The  SAVALLSAVF  command  outputs   all  of  the  saved  files  in  the
specified   library  to  tape.    It   is  the  companion  command  for
SAVALLCHG2.  SAVSAVFDTA outputs each save file.

If the SAVALLSAVF command  is interrupted, recovery can be  achieved by
specifying  the  BGNSAVF parameter  to  determine  which  save file  to
begin  at.   This  support  assumes that  you have  already  issued the
SAVALLSAVF  command  and  some  save  files  were  saved  and  that  an
interruption occurred.   You can determine from the job  log which save
file which was last saved correctly.

The  completion message and  the QPRINT  output identify how  many save
files were saved and how many had no data.

       Command parameters
       ------------------

   DEV           This is  the  same parameter  as  on SAVSAVFDTA.    It
                 supports a list of up to 2 devices.

   SAVFLIB       The library  containing the save  files.   The default
                 is  SAVFLIB.  All  the save  files found are  saved if
                 the BGNSAVF parameter is *FIRST.

   VOL           This  is similar  to the same  parameter on SAVCHGOBJ.
                 The  default  of  *MOUNTED  is  the  same  meaning  to
                 ignore  the volume  ID on  the  tape.   A 4  character
                 entry  may be made to describe a  set of volumes.  (If
                 you  enter  other   than  *MOUNTED,   it  must  be   4
                 characters).   A  two digit  sequence  number will  be
                 appended  to   the  name  given.    See  the  previous
                 discussion of Volume ID.

                 The special value *VOLLIST  may be entered to  specify
                 that a  list of Volume  IDs is  being provided in  the
                 VOLID parameter.

   VOLID         This is  similar to the same  parameter on SAVSAVFDTA.
                 The  default  of  *MOUNTED  is  the  same  meaning  to
                 ignore the  volume  ID on  the tape.    A 4  character
                 entry may  be made  to describe a  set of  volumes (If
                 you  enter other  than *MOUNTED,  a 4  character entry
                 must be made).   A two digit  sequence number will  be
                 appended  to  the  name   given.    See  the  previous
                 discussion of Volume ID.

   SEQNBR        The  sequence number of  the first file.   The default
                 is 1  which  differs  from  the  normal  SAV  commands
                 which use a default of *END.

   EXPDATE       The  expiration date  of  the tape.    The default  is
                 *DAY3 which  differs from the SAVCHGOBJ  default.  The
                 special  values *PERM or *DAY1,  *DAY2 ...  *DAY60 may
                 be entered  or a specific  date.   If a specific  date
                 is entered,  it must be  in job format and  is checked
                 to  ensure that  it is  a valid date  between tomorrow
                 and one year from today.

   CLEAR         Whether  to  clear  the  files  on  the  media.    The
                 default is *NONE.  *ALL may be specified.

   ENDOPT        Whether  to  rewind  the  tape   at  the  end  of  the
                 command.   The default is *REWIND.   *LEAVE or *UNLOAD
                 can be specified.   The  option you  specify does  not
                 take  affect  until the  last  SAVSAVFDTA  command  is
                 issued.

   BGNSAVF       Beginning  save  file to  start  at.   The  default is
                 *FIRST.   This is  designed as a  recovery function to
                 allow  a   restart  if  the   SAVALLSAVF  command   is
                 interrupted.   The  value entered  is used  to compare
                 against  each save file  in the library.   If the save
                 file name is  less than  the value, the  save file  is
                 ignored and  will appear  in the listing  as bypassed.

If  you  are  using  this  for  recovery,  you  will  want  to  specify
VOL(*MOUNTED).

   CHKSAVRST     A *YES/*NO option  for should the  TAA Tool  CHKSAVRST
                 be run.  The  default is *YES.  The  CHKSAVRST command
                 will  produce  a listing  to  QPRINT  of  all the  S/R
                 messages  which have  occurred during  the job.   When
                 the SAVALLSAVF command  begins and ends, a  message is
                 sent to  the job log  with the CPF9898 message.   This
                 will  be picked up by the  CHKSAVRST command to assist
                 you  in  determining  which  messages  belong  to  the
                 SAVALLSAVF command.

   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
                 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.

Security considerations
-----------------------

The  SAVALLCHG  commands  must  be  created  by  a  user  with  *ALLOBJ
authority (e.g.   the Security  Officer).   The CL  programs adopt  the
authority of  their owner  while in  execution in order  to be  able to
access  all  libraries  and  save  all  objects.   The  sub-program  to
execute  CHKSAVRST  is  done  using  TAASAVBC  which  is   specifically
created as USEADPAUT(*NO).   The commands  and initial CL  programs are
created to  take their authorization from  the TAASAVALLC authorization
list.    A user  must have  *USE authority  to the  authorization list.
See the Implementation section.

Reference date option
---------------------

If a new  library is created after  the SAVLIB operation, it  cannot be
saved  by SAVCHGOBJ  with REFDATE(*SAVLIB).   It  can be  saved  with a
specific  date  and time.    For  this reason,  the  SAVALLCHG commands
default the REFDATE value  to *ALLUSR which is  the date and time  that
the  last  SAVLIB *ALLUSR  was  performed  (Normally, only  the  SAVLIB
command  updates the  library object.    SAVCHGOBJ does  not).   When a
special value is  used for  SAVLIB (such as  *NONSYS), are  timestamped
by the system as saved at the same date and time.

To use  the default as it  is intended, you  must be saving  the system
regularly with SAVLIB LIB(*ALLUSR).

Note that if you rename a library, the create date does not change.

Tailoring your save strategy
----------------------------

Not  all of  the SAVCHGOBJ  parameters are  supported on  the SAVALLCHG
commands.

The  SAVFDTA option  exists on both  SAVALLCHG and  SAVALLCHG2 to allow
you to  avoid the  saving of save  file object  data.   The default  is
*YES which  saves the object and  save file data.   Specifying *NO will
only save the SAVF object (not the data).

You  may  want  to write  a  standard  routine for  daily  saves.   For
example, this could include:

   - SAVALLCHG (may include some bypassed libraries)
   - Full SAVLIB of certain critical libraries
   - SAVDLO

You may  have  some  libraries  that  you do  not  want  saved  by  the
commands.  This may  be because you have an  alternate means of backup,
the  libraries are not worth  saving or you  want to use  your own save
strategy for the library.

If you use  SAVALLCHG2 and bypass  some libraries so that  you can  use
your own save  to a save file in  the same library, you  should specify
your own function after the SAVALLCHG2 command.  For example:

            SAVALLCHG2     SAVFLIB(BACKUP) BYPASS(xxx)
            SAVCHGOBJ      ...   SAVF(BACKUP/xxx)
            SAVLIB         ...   SAVF(BACKUP/yyy)
            SAVALLSAVF     ...   SAVFLIB(BACKUP)

This sequence  is needed because the SAVALLCHG2  command will clear all
of the save files in the specified library.

If  you intend  to use  the companion  restore command  (RSTALLCHG) you
should consider starting  a new media  volume for either the  SAVALLCHG
or  SAVALLSAVF commands.   The  defaults  assume this.   The  RSTALLCHG
command can be used with the media produced by either command.

If  you have multiple  tape drives and  wish to use  the overlap rewind
function, you  can determine  which drive  was last  used by  accessing
the device  name from the message  data in the completion  message (See
the   example  in  the   Backup  and  Recovery   Programmers  Guide  on
Save/Restore which describes  this).   Assuming you do  this, you  will
want to use the  SAVALLCHG command as the last save  function since the
completion message will not pass back the last device used.

See  the earlier  comments  about Expiration  date and  Volume  ID that
could be used to assist your save strategy.

The  SAVALLCHG commands will save  everything they can.   At the end of
the command, if some  object could not be  saved, CPF9898 will be  sent
as an escape message.  You may need to monitor for this message.

Restoring using a SAVALLCHG approach
------------------------------------

For  the typical  day to  day  needs to  restore one  or more  objects,
there  is  little difference  between  a SAVOBJ/SAVLIB  approach  and a
SAVCHGOBJ approach.   You  must find  the proper  media  and issue  the
restore command for the objects required.

Since  SAVCHGOBJ  only saves  the  changed  objects,  you may  need  to
determine  where the most  current backup  is for the  required object.
If the  object  is still  on  the  system, the  last  save  information
(media volume ID, date and time) can be displayed with DSPOBJD.

In a disaster recovery situation, you will normally:

     - Restore from the last SAVLIB *NONSYS (or equivalent)
     - Restore from the last SAVCHGOBJ media

When  restoring from  the  last  SAVCHGOBJ  media, you  should  specify
ALWOBJDIF(*ALL) to  allow the restore  of objects where  there has been
an  owner change  or a  data base file  or member  has been re-created.
If this  occurs, there  will be  restore messages  describing what  the
system  has done  to the  existing objects.   Note  that  the RSTALLCHG
command defaults to ALWOBJDIF(*ALL).

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

The following TAA Tools must be on your system.

      ADDDAT        Add date
      CHKDAT        Check date
      CHKTIM        Check time
      CHKIBMLIB     Check IBM library
      CHKSAVRST     Check save/restore
      EDTVAR        Edit variable
      EXTLST        Extract list
      RTVALLUSR     Retrieve *ALLUSR
      RTVNONSYS     Retrieve Non-System
      SNDESCMSG     Send escape message
      SNDESCINF     Send escape information

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

The  tool  is ready  to  use, but  a  user  must be  authorized  to the
TAASAVALLC authorization list.   To  authorize a user,  use EDTAUTL  or
specify:

      ADDAUTLE     AUTL(TAASAVALLC) USER(xxx) AUT(*USE)

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

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

   SAVALLCHG     *CMD                      TAASAVC        QATTCMD
   SAVALLCHG2    *CMD                      TAASAVC2       QATTCMD
   SAVALLSAVF    *CMD                      TAASAVC3       QATTCMD
   SAVALLP       *FILE         PF          TAASAVCP       QATTDDS
   TAASAVCQ      *FILE         PF          TAASAVCQ       QATTDDS
   TAASAVCC      *PGM          CLP         TAASAVCC       QATTCL
   TAASAVCC2     *PGM          CLP         TAASAVCC2      QATTCL
   TAASAVCC3     *PGM          CLP         TAASAVCC3      QATTCL
   TAASAVCC4     *PGM          CLP         TAASAVCC4      QATTCL
   TAASAVCC8     *PGM          CLP         TAASAVCC8      QATTCL
   TAASAVCC9     *PGM          CLP         TAASAVCC9      QATTCL
   TAASAVCR      *PGM          RPG         TAASAVCR       QATTRPG
   TAASAVCR2     *PGM          RPG         TAASAVCR2      QATTRPG

Structure
---------

   SAVALLCHG
     TAASAVCC    CL pgm
       TAASAVCC9   CL pgm
       TAASAVCR    RPG pgm

   SAVALLCHG2
     TAASAVCC2   CL pgm
       TAASAVCC9   CL pgm
       TAASAVCC4   CL pgm
       TAASAVCR    RPG pgm

   SAVALLSAVF
     TAASAVCC3   CL pgm
       TAASAVCC8   CL pgm
       TAASAVCR2   RPG pgm
					

Added to TAA Productivity tools April 1, 1995


Home Page Up to Top