TAA Tools
CHKSAVDEV       CHECK SAVE DEVICE                      TAASAVN

The Check Save Device  command does a sanity check  of the Save/Restore
device  by  saving a  test  object and  then  restoring it.    Both the
object attributes and the object contents are sanity tested.

You may optionally monitor for the conditions of:

       - Tape label is permanent or not expired
       - Write protect exists

The  intent of the  CHKSAVDEV command is  that you would  use it at the
beginning of your backup.   This helps ensure  that the media about  to
be written by your backup function will be restorable.

A typical series of commands would be:

              CHKSAVDEV   DEV(TAP01) CLEAR(*ALL)
              SAVLIB      LIB(.....) SEQ(1) CLEAR(*ALL) ...

The  sample code assumes  that you  have mounted  the correct  tape and
are  going to  use it  for your  backup.   CHKSAVDEV will  minimize the
potential problems  where the  device or  the system  is not  operating
properly.

You must  have *SAVSYS or *ALLOBJ  special authority (or  adopt *ALLOBJ
special authority) to use CHKSAVDEV.

CHKSAVDEV defaults  to SEQ(1) which differs  from normal Save commands.

The CHKSAVDEV  data area  data area  will be  the first  object on  the
tape with an expiration date of yesterday.

You  would normally  follow  CHKSAVDEV with  your  backup commands  and
clear the test object from the save tape.

Either a tape or diskette device may be used.

CHKSAVDEV  saves the  CHKSAVDEV  data area  in TAATOOL  (it  contains a
string  of text)  and then  restores it  to QTEMP.   The value  of each
data  area  is  then retrieved  and  compared.    RTVOBJD  is  used  to
retrieve the  text description  and the user  defined attribute  of the
two  objects and the values  are compared.  This  helps ensure that the
system is properly  saving and  restoring the  OIR (Object  Information
Repository).

When a tape device  is created, the default is to unload  if the device
is   varied  off.    In   order  to  provide   specific  messages  with
ESCAPE(*YES), the  message queue  associated with  the device  must  be
temporarily changed  for the  duration of  the CHKSAVDEV  command.   In
order  to change  the  device description,  the device  must  be varied
off.    As  this would  result  in  unloading the  tape  if  the unload
default is used for the  device, the device is checked and  the request
rejected if  the device requests unload and  ESCAPE(*YES) is specified.
You must use either ESCAPE(*NO) or specify CHGDEVTAP UNLOAD(*NO).

CHKSAVDEV escape messages you can monitor for
---------------------------------------------

The following messages are sent if ESCAPE(*YES) is specified:

      TAA9881    The tape label is permanent or not expired
                    - if CLEAR(*NONE)
      TAA9882    The tape is Write Protected
      TAA9883    The S/R device or code is not working properly

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

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

   DEV           The device to be saved to.

   SEQ           The  tape file  sequence  number.   The default  is 1.
                 This differs from the default  used on the system  SAV
                 commands.    They   default  to  *END.     A  specific
                 sequence number or *END may be entered.

   CLEAR         Whether  to  clear  the  media  before  writing.   The
                 default is  *NONE  which is  the  same as  the  system
                 Save  commands.     *ALL   or  *AFTER   may  also   be
                 specified.

   ENDOPT        The  end of  tape  option.   The  default  is *REWIND.
                 *UNLOAD  or  *LEAVE may  also be  specified.   This is
                 the same parameter and default as on SAVOBJ.

   ESCAPE        A *YES/*NO value  for whether to send  specific escape
                 messages.

                 *NO is  the default in which case  system messages are
                 re-sent  if errors occur.   In most  cases, an inquiry
                 message is sent to  the message queue associated  with
                 the device if  errors occur.  If a  cancel response is
                 replied,  the  CHKSAVDEV ends  with  a  general escape
                 message.

                 *YES  may  be  specified  to  cause  specific   escape
                 message IDs  to be  sent for  Tape devices.   This  is
                 intended  to  allow specific  monitoring  within a  CL
                 program.

                 Because  the  handling of  escape messages  requires a
                 temporary  change   to   the  device   message   queue
                 (requires a  'vary off'), an  error will occur  if the
                 device  is  specified  to 'unload'  on  a  'vary off'.
                 You  may  change   the  device   description  to   not
                 'unload' or specify ESCAPE(*NO).

                 An  exception  to this  occurs  if  the tape  that  is
                 mounted   has   a  *PERM   or   unexpired   label  and
                 CLEAR(*NONE)  is  requested.     In  this  case,   the
                 TAA9881 message occurs.

                 See  the  Escape  Message  section  for  the  specific
                 escape messages that will be sent.

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

You must  have *SAVSYS or  *ALLOBJ special authority  (or adopt *ALLOBJ
special authority) to use CHKSAVDEV.

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

The following TAA Tools must be on your system:

           CHKALLOBJ      Check all object authority
           RTVSPCAUT      Retrieve special authority
           SNDCOMPMSG     Send completion message
           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
   ------        ----    ---------      ----------    ----------

   CHKSAVDEV     *CMD                   TAASAVN       QATTCMD
   TAASAVNC      *PGM       CLP         TAASAVNC      QATTCL
   TAASAVNC2     *PGM       CLP         TAASAVNC2     QATTCL
   CHKSAVDEV     *DTAARA
					

Added to TAA Productivity tools May 1, 1996


Home Page Up to Top