TAA Tools
PRTSAVLBL       PRINT SAVE TAPE LABELS                 TAASAVQ

The Print Save  Tape Labels command is  intended to be run  following a
save  operation  and creates  spooled  output to  be  used as  external
labels  for  tape  volumes.    A  save  requiring  multiple  volumes is
supported.

Assume you are using Option 23  from the GO SAVE menu.  After  the save
is complete you would run the PRTSAVLBL command such as:

             PRTSAVLBL    LBLTXT('Weekly full backup - Opt 23')

A spooled  output file would be  created with one page  for each Volume
ID  used.   A default sample  program is  supplied that  would create a
spooled file for each  Volume used.  The  following is output from  the
sample program:

*******************************************************************
*                                                                 *
*        Weekly backup - Option 23                                *
*                                                                 *
*        Tuesday   - 20:00:00       May 11, 2009                  *
*                                                                 *
*        System    - xxxxxxx        Release  - VnRnMn             *
*                                                                 *
*        Volume ID - TAP025         Tape seq - 1 of 3             *
*                                                                 *
*        Begin lib - AAA            End lib  - JJJ                *
*                                                                 *
*******************************************************************

Instead of the sample  program, you may use your  own program to format
the output.  See the later discussion.

In  order to produce the  labels, the PRTSAVLBL  command uses DSPJOBLOG
to create an  outfile of the  messages for the current  job.   Specific
Save command  messages are searched  for and the  message data is  used
to help create the label.

Because  of the  technique used,  there  are several  restrictions with
the tool:

  **   The  PRTSAVLBL command must be used in  the same job as the Save
       command.

  **   The messages created from  the Save command must still  exist in
       the job log (they cannot be removed).

  **   Unique Volume IDs must be used.

  **   Tape media must be used (not save files).

  **   No prior  save command should be  used unless you are  using the
       STRMSGVAL  function.   For  the simplest  use,  signoff, signon,
       run the save, and then run  PRTSAVLBL.  An option does exist  on
       PRTSAVLBL to  start the  label printing  at a specific  library.
       See the later discussion.

  **   A single object or library may not exceed 10 volumes.

  **   LABEL(*LIB) must be used on any Save command.

Handling of special saves
-------------------------

When a  command such as SAVCFG is used, a  special file name is used as
the file label when the tape is  written.  When the job log message  is
sensed for  SAVCFG, the  library name  is changed to  *SAVCFG which  is
the name that appears on the spooled tape label.

The following table shows the special values used:

                         Internal         Library name
         Function       Tape Label      for spooled label
         --------       ----------      -----------------

         SAVCFG          QFILEIOC          *SAVCFG
         SAVDLO          QDOCn             *SAVDLO
         SAVSECDTA       QFILEUPR          *SAVSECDTA
         SAVSYS          Several           *SAVSYS
         SAV             Several           *SAV

Begin and End library support
-----------------------------

As  shown  in  the   sample  label,  the  Begin  and  End  library  are
identified  for  each Volume  ID.   The  'Begin library'  describes the
first library  on  the Volume  for  which library  heading  information
exists.

The  'End library'  describes the  last library  header on  the Volume.
If  library heading  information  for libraries  LIB1, LIB2,  LIB3, and
LIB4 exist on the first Volume,  and LIB5, LIB6 and LIB7 on the  second
Volume, the information would appear as:

    Tape 1  --   Begin lib - LIB1          End lib  - LIB4
    Tape 1  --   Begin lib - LIB5          End lib  - LIB7

If a restore is  needed of a specific library,  you can determine which
Volume to mount.

When an  option such as SAVLIB LIB(*ALLUSR)  is used, the libraries are
saved in alphabetical order.   If you name a  series of libraries on  a
Save command,  you should follow  this convention  to provide a  simple
determination of which  tape to mount to begin  a restore of a specific
library.

If  a  single  library  (LIB1)  is saved  and  requires  one  tape, the
information would appear as:

    Tape 1  --   Begin lib - LIB1          End lib  - *END

If  a single  library  (LIB1) is  saved  and  requires two  tapes,  the
information would appear as:

    Tape 1  --   Begin lib - LIB1          End lib  - *CONTINUED
    Tape 2  --   Begin lib - *CONTINUED    End lib  - *END

If  a single  library (LIB1)  is saved  and requires  three  tapes, the
labels would appear as:

    Tape 1  --   Begin lib - LIB1          End lib  - *CONTINUED
    Tape 2  --   Begin lib - *CONTINUED    End lib  - *CONTINUED
    Tape 2  --   Begin lib - *CONTINUED    End lib  - *END

When  both the  Begin and End  libraries indicate  *CONTINUED, there is
no library header on the Volume.

STRMSGVAL function
------------------

The STRMSGVAL option  will allow  you to start  the PRTSAVLBL  function
at  a specific  point  in the  job  log.   This  allows  you to  bypass
previous  save messages.  For  example, if you run  multiple saves, you
may want to use  PRTSAVLBL following each save  and avoid the  messages
from a  previous save in  the current listing.   The SNDJLGMSG  command
is used  to set a mark in  the job log that can  be found by PRTSAVLBL.
A typical series of commands would be:

       SNDJLGMSG    MSG('SAVE2')
       SAVxxx       ...
       PRTSAVLBL    ... STRMSGVAL(SAVE2)

SNDJLGMSG  sends  the TAA9878  message  to the  job  log.   Because the
STRMSGVAL is specified, PRTSAVLBL  will search for the TAA9878  message
and compare  the message text to  the STRMSGVAL value.   If it matches,
the messages will be listed beginning at that point.

If  STRMSGVAL is specified,  an additional spooled file  is output that
describes the  TAA9878  messages  found (if  any).   If  the  value  is
found, the  spooled file is  deleted.  If the  value is not  found, the
spooled  file is retained  and may be  used as a  problem determination
aid.

Default sample program
----------------------

The  default  sample  program  is  TAASAVQR2  which  is  a  simple  RPG
program.    The program  is  passed  a  single parameter  which  is  an
externally described  data structure.  The data  structure contains the
information  for one label.   The time on the sample  label is the time
the label printing program began.

You can use  any information provided and  reformat the label.   To see
the field information provided in the data structure enter:

             DSPFMT    FILE(TAASAVQP)

To change  the format of the  label or to print  different information,
do the following:

  **   Use  CPYTAA  to  copy  out  the  source  for  TAASAVQR2 to  file
       QATTRPG in library TAATOOL.

             CPYTAA    TAAARCMBR(TAASAVQR2)

  **   Use MOVM to  move the  member to  one of your  own source  files
       such as:

             MOVM        FROMFILE(TAATOOL/QATTRPG)
                           TOFILE(xxx) FROMMBR(TAASAVQR2)
                           TOMBR(yyy)

  **   Change  the  source  of  the  program  as  required.    See  the
       instructions within the source.

  **   Create the  program in your own library (it  does not have to be
       an RPG program):

             CRTxxxPGM   PGM(yyy) ...

  **   As the  Security Officer,  change the  name of  the program  and
       library for the PRTSAVLBL user space in TAASECURE by entering:

             EDTAPPVAL   APPVAL(TAASECURE/PRTSAVLBL)

When the information is  displayed, key over the top  for your specific
program.

Page length of the labels
-------------------------

The PAGELEN  parameter on the  PRTSAVLBL command allows  you to specify
the  number  of  lines  for  each  label.    This  provides  for proper
skipping to the next label.  The default is 15.

The value you  specify is used  on an OVRPRTF  command for file  QPRINT
(as defined in  the TAASAVQR2 program).  If you choose  to use your own
print  file  in  place  of  QPRINT,  the  PAGELEN  parameter  value  is
ignored.

Replacing the QPRINT file
-------------------------

You may  use a  file  other than  QPRINT as  defined in  the  TAASAVQR2
program.   Specifying  your  own  file would  allow  you  to provide  a
specific page length rather than using the command parameter.

The FIRSTLINE  parameter on PRTSAVLBL, determines  where the first line
of print will begin on each label.   This information is passed in  the
externally  described data  structure.   The  TAASAVQR2 program  prints
blank lines to space to the specified line.

If you  use your own  program, you can  ignore the value  passed in the
data  structure  and specify  a  'skip to'  value  for the  first line.
This can be done with either QPRINT or your own printer file.

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

Program TAASAVQC2  adopts  the  use of  the  QSECOFR profile  to  allow
access to the  PRTSAVLBL user space in the TAASECURE  Library.  This is
a read only function and no known security concerns exist.

The  other  objects provided  by  PRTSAVLBL are  available  for *PUBLIC
use.

Clearing existing messages
--------------------------

It is not necessary to Signoff  and Signon to clear out messages.   The
TAA  Tool  RMVALLMSG may  be  used  to  remove  all messages  from  the
current job.

RMVALLMSG  will prompt  the user  for a  Y/N value  to ensure  that the
clear is appropriate.

If you are using a  Save command in a CL  program, you can ensure  that
no prior save command messages  exist in the job log.   For example, if
your CL  program first includes the TAA Tool  CHKSAVDEV, this will do a
sanity check of the save device by doing a save and restore.

You may use the following two commands to clear out all messages:

             RMVMSG     PGMQ(*ALLINACT) CLEAR(*ALL)
             RMVMSG     PGMQ(*PRV) CLEAR(*ALL)

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

   LBLTXT        The  text that will appear in  the label.  This allows
                 you  to print  a  value  such  as  'Daily  backup'  or
                 'Monthly  backup -  Opt 23'.   The  default  is *NONE,
                 which  causes blanks  to be  passed in  the externally
                 described data structure.

   PAGELEN       The  number of  lines  for  the  page  length  of  the
                 label.  The default  is 15.  This value  is used on an
                 OVRPRTF  for  QPRINT.    If  you  use your  own  label
                 printing program, you  may use a  different file  name
                 in which case the value is ignored.

   FIRSTLINE     Where the  first  line of  output should  occur.   The
                 default  is for line  4.   This information  is passed
                 to  the label printing program  in the data structure.
                 The supplied  program uses  the value  to print  blank
                 lines.

                 If you  change the program, you can  ignore this value
                 and perform your own skipping to the first line.

   STRLIB        The   first  library   to  be  considered   when  Save
                 messages are  being  read  from  the  job  log.    The
                 default is *FIRST meaning the first library found.

                 The simplest use  of PRTSAVLBL is to  signoff, signon,
                 run the Save, and then use PRTSAVLBL.

                 If you  have run other save commands  and then want to
                 run PRTSAVLBL for  the last save  issued, the  default
                 will cause  the information  from the  prior saves  to
                 be considered  as part of the last save.   If you know
                 the  first library (internal label)  that was saved by
                 the Save operation you  want to print labels for,  you
                 may specify  it.   Consider using DSPJOBLOG  to assist
                 in  finding  the first  completion  message  after the
                 Save command  began  to  identify  the  first  library
                 (internal label).

   OUTQ          The output  queue for  the QPRINT  spooled file.   The
                 default is *JOB.

                 A  specific output queue may  be named.   If an output
                 queue is named  without a library,  *LIBL is  assumed.

   STRMSGVAL     The default  is *NONE meaning  all messages  found are
                 considered.

                 The  parameter  is  designed  to work  in  conjunction
                 with  the SNDJLGMSG  command which  will allow  you to
                 send a  message  to  the job  log  to mark  where  the
                 PRTSAVLBL function  should begin.  This  allows you to
                 bypass  previous  messages which  are  not  related to
                 the save  operation  that  you want  to  print  labels
                 for.

                 Up to 20  bytes may be entered.   A good value  to use
                 would include the current date and time.

                 Using  SNDJLGMSG  allows  you  to  have multiple  save
                 operations in the  same job  and be  able to  identify
                 the messages related to each save.

                 If the value  specified matches the message text  of a
                 TAA9878  message,  the PRTSAVLBL  function  will begin
                 considering  messages.    For  example,  if  SNDJLGMSG
                 MSG(SAVE1) is specified  prior to the SAVxxx  command,
                 PRTSAVLBL  can specify  STRMSGVAL(SAVE1) to  allow any
                 messages  prior  to  the  TAA9878  message  containing
                 this value to be bypassed.

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

See the previous discussion.

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

The following TAA Tools must be on your system:

     APPVAL          Application value
     CVTSYSLVL       Convert system level
     EDTVAR          Edit variable
     RTVDAT          Retrieve date
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCMSG       Send escape message
     SNDSTSMSG       Send status message

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

None, the tool  is ready  to use.   You may  change the  format of  the
label as described previously.

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

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

   PRTSAVLBL     *CMD                   TAASAVQ       QATTCMD
   TAASAVQC      *PGM       CLP         TAASAVQC      QATTCL
   TAASAVQC2     *PGM       CLP         TAASAVQC2     QATTCL
   TAASAVQR      *PGM       RPGLE       TAASAVQR      QATTRPG
   TAASAVQR2     *PGM       RPG         TAASAVQR2     QATTRPG
   TAASAVQP      *FILE      PF          TAASAVQP      QATTDDS
   PRTSAVLBL     *USRSPC

The PRTSAVLBL user space is in the TAASECURE library.
					

Added to TAA Productivity tools May 1, 1998


Home Page Up to Top