TAA Tools
SPLSTO          SPOOL STORE                            TAASPMR

The Spool  Store tool  is a series  of commands  that lets  you capture
spooled files  and retain them online.   Two types of  Spool Stores are
provided  1)  an  *AUTO  type where  each  spooled  file  is internally
assigned a unique ID, and 2)  a *MANUAL type where you assign an  ID to
each  spooled  file.   Several  commands  exist  to convert,  re-print,
maintain, and 'work with' the Spool Store.

More than one Spool Store may exist, but only one per library.

You begin by creating a Spool Store File:

             CRTSPLSTO    SPLSTOLIB(xxx) TYPE(*AUTO)

This  creates the Spool  Store objects in  the named library.   In this
example, an  *AUTO type  Spool Store  is requested  where each  spooled
file that is converted will be automatically assigned a unique ID.

Assume the  named library  is on  your library  list for the  following
commands.

To convert a spooled file to the Spool Store, specify:

             CVTSPLSTO   FILE(yyy)

Since  the JOB parameter was  not specified, the spooled  file would be
accessed from the current job and added  to the Spool Store.  A  unique
number would be assigned as the ID.

System APIs  are used to  convert the spooled  attributes and data.   A
single data base file member is used for all spooled files.

Once the  spooled file is  converted, the original spooled  file may be
deleted.  The Spool Store allows the spooled file to be re-printed.

You  can convert an  entire output queue  to an *AUTO  Spool Store with
the command:

            CVTSPLSTO2  OUTQ(xxx)

In  addition to  the  spooled file  data,  each  spooled file  that  is
placed in the  Spool Store causes an audit record to  be generated in a
separate  file.   These records  would normally  be displayed  with the
WRKSPLSTO command such as:

             WRKSPLSTO     ...

A subfile display would appear with options to:

          - Delete     - Delete the spooled file
          - Display    - Display the spooled file data
                           A prompt appears after the display for
                            whether the file should be retained.
          - Re-print   - Re-print the spooled file
          - Attributes - Display the attributes of the spooled file

Several optional parameters  exist on the  WRKSPLSTO command to  assist
you in  selecting the  records that  will be  displayed in the  subfile
(such  as  a range  of dates,  spooled  file name,  output  queue name,
etc.)

From the subfile display,  a Command Key may  be used to re-prompt  for
the  selection parameters  (you do  not  have to  return  to enter  the
WRKSPLSTO  command.   The re-prompt  function  causes a  command prompt
for  the  WRKSPLSTO2  command  which  is  a  subset  of  the  WRKSPLSTO
command.

Because system  APIs  are  used to  convert  and re-print  the  spooled
file, there  are no  restrictions regarding the  type of data  that can
be  converted.    No  loss  of  attributes  occurs  when  the  file  is
re-printed.    This  is  as  opposed  to  CPYSPLF  which   has  several
restrictions.

The MTNSPLSTO  command would be used  to remove spooled files  that are
no longer needed such as:

             MTNSPLSTO   NBRDAYS(100)

will  remove all spooled files  that were opened over  100 days ago and
retain those opened  in the  last 100 days.   In  conjunction with  the
retention number  of  days, options  exist on  the command  so you  can
remove  only  the spooled  files  associated  with  a particular  user,
output queue, etc.

CVTSPLSTO2 Special handling
---------------------------

CVTSPLSTO2 ignores the following spooled files:

  **   Any spooled files that are in an OPN status.

  **   Any  spooled files  that have  already been  converted.   When a
       spooled file is  added, a logical file  is updated with the  key
       of:

         - Spooled file name
         - Spooled file number
         - Qualified job name (job number/user/job)

       If the  key already exists, the  file is ignored.   Note that if
       a  spooled  file is  converted  and  then moved  to  a different
       output queue, it will not be converted the second time.

Manual Spool Store
------------------

The optional type of Spool Store allows  you to assign an ID.  This  is
intended for  the case  where you  want only  a single  version of  the
spooled  file kept  online such  as  the last  compiler listing  or the
last version of a report.

The Spool Store would be created as:

             CRTSPLSTO    SPLSTOLIB(xxx) TYPE(*MANUAL)

CVTSPLSTO would appear as follows:

             CVTSPLSTO   FILE(xxx) STOID(yyyy)

If a spooled  file of the  same ID exists,  it would  be replaced.   If
the ID does not exist, it would be added.

Because you  have assigned your  own ID, the  PRTSPLSTO command can  be
used in an application to re-print the spooled file.

For a  *MANUAL type of Spool  Store, the physical files  are created as
REUSEDLT(*YES) to reuse deleted record space.

The  following commands  cannot be  used with  a *MANUAL type  of Spool
Store:

         CVTSPLSTO2     Converts all SPLFs in an output queue
         MTNSPLSTO      Maintains Spool Store (deletes old versions)
         RNNSPLSTO      Renumbers the IDs in an *AUTO Spool Store

A spool store ID  may be deleted using  WRKSPLSTO or by the  DLTSPLSTOD
command

Objects created
---------------

      SPLSTOAUD    Physical - One rcd per spooled file (Arrival seq)
      SPLSTOAUDL     -  Logical over SPLSTOAUD by ID
      SPLSTOAUDM     -  Logical over SPLSTOAUD by Open date/time
      SPLSTOAUDN     -  Logical over SPLSTOAUD by Qualified SPLF
      SPLSTODTL    Physical - Detail spooled data - by ID
      SPLSTO       *USRSPC - Only created for *AUTO types

The  Spool  Store  type  (*AUTO  or  *MANUAL) is  stored  in  the  User
Attribute field of SPLSTOAUD.


Reorganization of the files
---------------------------

The  DSPSPLSTO  command will  describe  the number  of  deleted records
that exist in each file.

  **   For an *AUTO  type Spool Store, the  physical files are  created
       as  REUSEDLT(*NO).    It  is expected  that  you  will  use  the
       MTNSPLSTO   command  to  delete  old   spool  data.    MTNSPLSTO
       supports an option to reorganize the files.

  **   For a *MANUAL type Spool  Store, the physical files are  created
       as REUSEDLT(*YES).   When an existing  ID is used  on CVTSPLSTO,
       the existing  spool data is deleted and a  new version is added.
       You  can  delete an  ID by  using the  WRKSPLSTO  option.   If a
       large amount of deleted  records exist, you should  consider the
       use of RGZPFM.

Commands supported
------------------

         CRTSPLSTO      Creates the Spool Store
         CVTSPLSTO      Converts a spooled file into the Spool Store
         CVTSPLSTO2     Converts all SPLFs in an output queue
         DLTSPLSTO      Deletes the Spool Store
         DLTSPLSTOD     Deletes the Spool Store ID and data
         DSPSPLSTO      Displays the description of a Spool Store
         MTNSPLSTO      Maintains Spool Store (deletes old versions)
         PRTSPLSTO      Re-prints a spooled file from the Spool Store
         RNNSPLSTO      Renumbers the IDs in an *AUTO Spool Store
         RTVSPLSTO      Retrieves the attr of a SPLF in a Spool Store
         WRKSPLSTO      Works with the Spool Store audit records
         WRKSPLSTO2     Internal command for re-prompt during WRKSPLSTO

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

CRTSPLSTO creates the  files by default to *USE  authority.  This means
that  if the user  is authorized to  access a spooled file,  he may use
CVTSPLSTO or CVTSPLSTO2 to  place that spooled file  in a Spool  Store.
With  *USE authority,  the user  may also  use the  re-print option  on
WRKSPLSTO to re-print any spooled file.

The  user who  uses the re-print  option becomes  the owner of  the new
spooled file that is created.

The delete option is  only available to  users with *CHANGE  authority.

Use  EDTOBJAUT to  change  the authorizations  if  required.   The  two
physical  files   (SPLSTOAUD  and  SPLSTODTL)  should   have  the  same
authority.

The  following  commands require  the user  to have  all rights  to the
objects:

      - DLTSPLSTO
      - MTNSPLSTO
      - RNNSPLSTO

To allow updating  of the files  for users with  *USE authority, a  few
of the RPG programs use the program adopt function.

Synchronization of the files
----------------------------

Because commitment  control is  not used, the  files may become  out of
synch  if an abnormal  termination occurs.   For example,  there may be
an audit record without any detail records or vice versa.

When DSPSPLSTO  is used  to a  Workstation, the  IDs  in the  SPLSTOAUD
file are checked to ensure that they exist in SPLSTODTL.

When DSPSPLSTO  is used  to print,  the same  check occurs  as well  as
checking  that   the  IDs  in  SPLSTODTL  exist   in  SPLSTOAUD.    Any
discrepancies will be listed.

If an audit  record exists, but  no spool detail records,  there is  no
recovery possible.  Use WRKSPLSTO to delete the audit record.

If  spool detail  records  exist,  but no  audit  record, it  would  be
possible to use  a command like EDTDBF on  the SPLSTOAUD file to create
enough  of  a  record to  allow  re-printing.   The  minimum  number of
fields to be entered would be:

         SQID
         SQOUT
         SQOUTL
         SQSPLF

After entering  the record, use  PRTSPLSTO to print  a new version  and
then re-enter it  into the Spool Store with  CVTSPLSTO.  The attributes
of  the file are  stored in the  detail records so it  is not necessary
to enter all the values in order to re-print the spooled file.

The SCHEDULE  parameter is  changed  to *FILEEND  for the  new  spooled
file  when PRTSPLSTO  occurs.   This  avoids  the  problem caused  when
*JOBEND was  originally specified for the  spooled file and re-printing
occurs.

If you  do  not  want the  detail  data,  you can  delete  the  records
manually using a  command such as  EDTDBF.  The RNNSPLSTO  command will
also  drop any detail  records that do  not have a  corresponding audit
record.

It  is possible  that a failure  during CVTSPLSTO will  prevent all the
spool data from being  converted.  PRTSPLSTO will  fail if the data  is
not complete.   If you  suspect a problem,  use CVTSPLSTO again  on the
same  file  (for  an  *AUTO  Spool  Store  you  could  also delete  the
incomplete version).

Duplicate key errors (DUPKEY)
-----------------------------

If an  abnormal termination  occurs,  it is  possible that  the  number
counter (SPLSTO  *USRSPC) for *AUTO  type Spool  Stores will be  out of
synch with  the IDs being assigned with the  SPLSTOxxx files.  This may
result in a  duplicate key error  on the  next use of  CVTSPLSTO as  it
attempts to  add  a unique  key to  SPLSTOAUD  or new  spooled data  is
added to SPLSTODTL.

If the error  is in the SPLSTOAUD file,  use DSPSPLSTO to determine the
last  ID  in  the file  and  the next  ID  to  be assigned.    Then use
ADDNBRCTR  to add  a  value  to the  number  counter  so that  it  will
properly assign the next number.

             ADDNBRCTR   NBRCTR(xxx/SPLSTO) AMT(nnn)

If the  error is in  the SPLSTODTL file,  use DSPPFM for  the SPLSTODTL
file  and  determine the  ID  of the  last  record (first  10  bytes of
data).  Then use ADDNBRCTR as described previously.

Note that it is  not essential that the last  IDs in both files  match.
The only requirement  is that the next  ID to be assigned  be unique in
both files.

Escape messages
---------------

Most of  the commands do not provide  specific escape messages that can
be monitored for.  The following do:

      CVTSPLSTO escape messages you can monitor for
      ---------------------------------------------

           TAA9893    A file in an *OPEN status cannot be converted
           TAA9894    Qualified SPLF name already exists for same job

      RTVSPLSTO escape messages you can monitor for
      ---------------------------------------------

           TAA9892    The spooled store ID does not exist

      PRTSPLSTO escape messages you can monitor for
      ---------------------------------------------

           TAA9892    The spooled store ID does not exist (ESCAPE parm)
           TAA9895    No detail records exist for the ID

      DLTSPLSTOD escape messages you can monitor for
      ----------------------------------------------

           TAA9896    The spooled store ID does not exist

Differences with the Spool Archive tool
---------------------------------------

The Spool Archive (SPLARC)  tool allows spooled  files to be  converted
to data  base members  and re-printed  in a similar  manner as  SPLSTO.
Both tools  use a similar concept of an  audit record per spooled file.

The  SPLARC tool  converts one  output queue to  a data  base file with
one member per  spooled file.  Based  on your specifications, the  data
base file is  kept on line for one  or more days and then  deleted.  If
the data  base file is online, the spooled  file can be re-printed.  If
the data base  file is offline, you  must mount a  tape to restore  the
proper data base member before printing.

SPLSTO  keeps everything  online.   No  restore is  necessary, but  the
online storage requirements can be more significant.

You  can minimize the  online storage  requirements by frequent  use of
MTNSPLSTO.   You can  use different  retention dates  depending on  who
the user is, the output queue, etc.

Renumbering the IDs for an *AUTO Spool Store (Threshold messages)
-----------------------------------------------------------------

An  *AUTO Spool  Store  can  have  a maximum  of  4,294,967,250  unique
numbers assigned.   The numbers are assigned by  using the NBRCTR tool.

When  spooled files  are deleted  (by MTNSPLSTO  or from  the WRKSPLSTO
display), the numbers are not re-used.

As you approach  the 4 billion limit,  threshold messages will be  sent
to QSYSOPR  recommending a change.   When it is convenient,  you should
use the RNNSPLSTO command.

RNNSPLSTO  requires a work library  with no objects in  existence.  The
existing objects  in a Spool  Store are  copied (without  data) to  the
work library.  A program is used to renumber the assigned IDs.

RNNSPLSTO has 4 major steps:

         - Duplicating the objects to the work library
         - Renumbering the data by re-writing to the work library
         - Deleting the SPLSTO objects from your library
         - Moving the work library SPLSTO  objects to your library

If  RNNSPLSTO fails,  the recovery  process varies  depending on  where
the  failure occurred.   Look  at the  messages that  were output.   If
'Renumbering successfully completed' did not  occur, you may clear  the
work library and start over.

If the  'Renumbering  successfully ...'  message exists,  look for  the
message  'SPLSTOx objects deleted  in library ...'.   If this  does not
exist,  use  DLTSPLSTO  on the  SPLSTO  library to  delete  any SPLSTOx
objects and then move the objects from the Work library.

If the 'SPLSTOx  objects deleted ...' message  exists, move any of  the
remaining objects from the work library to the SPLSTO library.

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

The  Create Spool Store  command creates  the files  used by  the Spool
Store tool.

   SPLSTOLIB     The  library  where the  Spool Store  objects  will be
                 created.

   TYPE          The type of  Spool Store to be  created.  The  default
                 is  *AUTO which  means  that when  a  spooled file  is
                 converted  to the  Spool Store,  a  unique ID  will be
                 internally assigned.  Old  versions may be removed  by
                 an  option on  WRKSPLSTO  or  by using  the  MTNSPLSTO
                 command.

                 *MANUAL  may  be entered  to  describe  that the  user
                 will  assign an ID when CVTSPLSTO  is used.  If the ID
                 already  exists, the  existing  spooled data  for  the
                 same  ID is  deleted and  the new  version added.   If
                 the  ID does not exist,  it is added.   Thus, there is
                 only one version for each ID.

   SRCLIB        The  source  library  to  use  for  the  QATTDDS  file
                 source.   The default is *TAAARC.   If a  full license
                 exists, the  source is used from the  TAA Archive.  If
                 a demonstration  license exists,  the source  is  used
                 from the QATTDDS file in the TAATOOL library.

                 A specific user  library may be named, but  the source
                 file must be QATTDDS.

   AUT           The  authority  to the  physical  files  that will  be
                 created.  *USE is the default.

                 With  *USE, any  user who  can display  a spooled file
                 can convert it into  the Spool Store and re-print  any
                 spooled file  in the  Spool Store.   A user  with *USE
                 authority   cannot  use  the   delete  option  on  the
                 WRKSPLSTO display.

                 *CHANGE  may  be  specified  to  allow  any  user  the
                 functions of *USE  plus the ability to  use the delete
                 option on the WRKSPLSTO display.

                 *EXCLUDE  may  be  specified  to  prevent the  *PUBLIC
                 user from any access to the Spool Store files.

                 If  individual  users  should  be  authorized  for   a
                 specific  function,  use  EDTOBJAUT  or  GRTOBJAUT  to
                 both   the  SPLSTOAUD  and   SPLSTODTL  files.     For
                 example,  if the  *PUBLIC has  *USE authority,  but an
                 individual user should  have *CHANGE authority,  grant
                 *CHANGE  authority to  that  individual for  SPLSTOAUD
                 and SPLSTODTL.

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

The  Convert Spool  Store command converts  a single  spooled file into
the Spool Store.   The user must be able  to display the spooled  file.
See  also CVTSPLSTO2  which converts  all  spooled files  in an  output
queue.

   FILE          The  spooled file to  be placed into  the Spool Store.

   JOB           The qualified  job name  of the  spooled file.   *  is
                 the default for the current job.

                 Specific entries  may be made  for job, user,  and job
                 number.

   SPLNBR        The  number  of  the  spooled  file.    *ONLY  is  the
                 default  meaning it is  the only spooled  file of that
                 name in the specified job.

                 *LAST  or  a  specific   spool  file  number  may   be
                 entered.

   STOID         The  ID to  be assigned  to  the spooled  file in  the
                 Spool  Store.   The  default  is *DFT  meaning  that a
                 unique number is internally  assigned.  *DFT may  only
                 be used for an *AUTO type of Spool Store.

                 If a  *MANUAL type  of Spool  Store exists,  *AUTO may
                 not  be used and a  specific ID must be  entered.  The
                 ID assigned must  follow the same  rules as an  object
                 name.  An expression  may be used.  If  a spooled file
                 in  the  Spool Store  exists  of the  same  ID, it  is
                 automatically  deleted and the new  version added.  If
                 the ID does not exist, it is added.

   DLTSPLF       A *YES/*NO  value for  whether to  delete the  spooled
                 file after  it is  converted.  *NO  is the  default to
                 retain the spooled file.

                 *YES may be specified to delete the spooled file.

   SPLSTOLIB     The  library  where  the  Spool  Store objects  exist.
                 *LIBL is  the  default.   A  specific library  may  be
                 named.

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

The Convert  Spool Store 2 command  converts all spooled files  from an
output  queue into a  Spool Store.   Each spooled file  is converted by
the CVTSPLSTO command.   Any  files that  are in  a status  of OPN  are
bypassed.   Any files that  have already  been converted (same  spooled
file  name number  and qualified  job name)  are bypassed.   CVTSPLSTO2
may only be used on an *AUTO Spool Store.

   OUTQ          The  qualified  name  of the  output  queue  where the
                 spooled files  will be  converted from.   The  library
                 qualifier  defaults to  *LIBL.   *CURLIB  may also  be
                 specified.

   DLTSPLF       A  *YES/*NO value  for whether  to delete  the spooled
                 file after it  is converted.   *NO is  the default  to
                 retain the spooled file.

                 *YES may be specified to delete the spooled file.

   SPLSTOLIB     The  library  where  the Spool  Store  objects  exist.
                 *LIBL  is  the default.    A specific  library  may be
                 named.

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

The Display  Spool  Store  command  displays  the  current  information
about a specific  Spool Store.  The  number of spooled files,  sizes of
the files, and type of Spool Store are displayed.

The command  ensures synchronization exists (both files  are checked if
printing the results).

   SPLSTOLIB     The  library  where  the  Spool  Store  objects exist.
                 *LIBL is  the  default.   A  specific library  may  be
                 named.

   OUTPUT        How  the  output  should  be  displayed.   *  means  a
                 display    appears    if   the    command    is   used
                 interactively.   If the  command is  run  in batch  or
                 *PRINT  is   specified,  a   spooled  file   with  the
                 SPLSTOLIB name is output.

                 If  no spooled  output occurs,  the SPLSTOAUD  file is
                 checked to see  that all  IDs exist  in the  SPLSTODTL
                 file.   If spooled output  occurs, the  previous check
                 is  done  as well  as  ensuring that  all  IDs in  the
                 SPLSTODTL file exist in the SPLSTOAUD file.

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

The  Retrieve Spool Store  command retrieves many  of the attributes of
a spooled file  in a Spool Store.   The command may  only be used in  a
CL program.

   STOID         The ID  assigned to the spooled file  to be retrieved.

   RTNLIB        An  optional  parameter  for  the  library  where  the
                 Spool  Store  files  exist.    If  used,  it  must  be
                 specified as  *CHAR LEN(10).   This  parameter may  be
                 helpful if SPLSTOLIB(*LIBL) is specified.

   SPLF          An  optional  parameter for  the name  of  the spooled
                 file.    If  used,  it  must  be  specified  as  *CHAR
                 LEN(10).

   JOB           An optional  parameter  for the  job name  of the  job
                 that created  the spooled file.   If used,  it must be
                 specified as *CHAR LEN(10).

   USER          An  optional parameter  for the  user name  of the job
                 that created the  spooled file.   If used, it must  be
                 specified as *CHAR LEN(10).

   JOBNBR        An optional  parameter for the  job number of  the job
                 that  created the spooled  file.  If used,  it must be
                 specified as *CHAR LEN(6).

   SYSTEM        An  optional  parameter  for  the  system  where   the
                 spooled  file  was  created.   If  used,  it  must  be
                 specified as *CHAR LEN(8).

   OUTQ          An optional  parameter for the output  queue where the
                 spooled file  existed  when  it  was  converted.    If
                 used, it must be specified as *CHAR LEN(10).

   OUTQL         An optional  parameter for the  library of  the output
                 queue  where  the spooled  file  existed  when it  was
                 converted.   If  used, it  must be  specified as *CHAR
                 LEN(10).

   OPNDAT        An optional parameter  for the  date the spooled  file
                 was  opened  by  a  program.   If  used,  it  must  be
                 specified  as  *CHAR  LEN(7) and  is  returned  in the
                 CYYMMDD format.

   OPNTIM        An optional parameter  for the  time the spooled  file
                 was  opened  by  a  program.   If  used,  it  must  be
                 specified  as  *CHAR  LEN(6) and  is  returned  in the
                 HHMMSS format.

   TOTPAG        An optional parameter  for the total  number of  pages
                 in the spooled  file.  If  used, it must  be specified
                 as *CHAR LEN(10).

   PAGWTH        An  optional  parameter  for  the  page width  of  the
                 spooled  file.    If  used, it  must  be  specified as
                 *CHAR LEN(3).

   USRDTA        An  optional parameter  for  the user  data  specified
                 for the spooled  file.  If used, it  must be specified
                 as *CHAR LEN(10).

   RPLCNT        An  optional  parameter for  the number  of  times the
                 spooled file  has  been replaced.    This is  only  of
                 value for  a *MANUAL  type of Spool  Store.   If used,
                 it  must be specified as  *DEC LEN(5 0).   *AUTO types
                 will always return a value of 0.

   RPTDAT        An optional parameter  for the last  date the  spooled
                 file was  re-printed.  If  used, it must  be specified
                 as *CHAR LEN(7) and will be in the format CYYMMDD.

   RPTTIM        An  optional parameter for  the last time  the spooled
                 file  was re-printed.   If used, it  must be specified
                 as *CHAR LEN(6) and will be in the format HHMMSS.

   RPTUSR        An  optional   parameter  for  the   last  user   that
                 requested a  re-print of the  spooled file.   If used,
                 it must be specified as *CHAR LEN(10).

   RPTCNT        An  optional parameter  for the  number of  times that
                 the spooled file  has been  re-printed.   If used,  it
                 must be specified as *DEC LEN(5 0).

   FORMTYP       An  optional parameter  for  the  form type  specified
                 for the  spooled file.  If used,  it must be specified
                 as *CHAR LEN(10).

   OPNPGM        An optional  parameter  for the  program  that  opened
                 the spooled file.   If used,  it must be  specified as
                 *CHAR LEN(10).

   OPNPGML       An optional  parameter for the library  of the program
                 that  opened the  spooled file.   If used,  it must be
                 specified as *CHAR LEN(10).

   SPLSTOLIB     The  library  where the  Spool  Store  objects  exist.
                 *LIBL  is the  default.   A  specific  library may  be
                 named.

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

The  Print Spool Store command re-prints a  spooled file that is in the
Spool Store.   The user  of the command  becomes the owner  of the  new
spooled  file.   The  command  is normally  run  as  an option  on  the
WRKSPLSTO display.

   STOID         The ID of the spooled file to be re-printed.

   SPLFNAME      The  name of the  spooled file when  it is re-printed.
                 The default  is *SPLF  meaning the  same name  as  the
                 original spooled file.

   OUTQ          The  qualified name  of  the  output queue  where  the
                 spooled  file  should  exist  when it  is  re-printed.
                 The   default  is   *JOB  meaning   the  output  queue
                 assigned to the user of the PRTSPLSTO command.

                 *SPLF may be  specified to use  the same output  queue
                 where the spooled file was converted from.

                 A specific output queue may also be named.

   HOLD          Whether  to   hold  the   spooled  file  when   it  is
                 re-printed  (re-printing  places the  spooled  file on
                 an output queue).  Holding  the file will ensure  that
                 a writer does  not make a hard copy until  the file is
                 released.

                 The   default  is  *SAME  meaning   to  use  the  same
                 attribute that  existed  when  the  spooled  file  was
                 converted.

                 *YES may be specified to hold the spooled file.

                 *NO may  be specified  so that  the spooled file  will
                 not be held.

   ESCAPE        A  *YES/*NO parameter  for whether  to send  an escape
                 message  if  the sub  function  CVTTOSPLF fails.   The
                 default is *YES.

                 *NO may be  used to send the  same message as a  *DIAG
                 type.

   SPLSTOLIB     The  library  where  the  Spool Store  objects  exist.
                 *LIBL  is  the default.    A specific  library  may be
                 named.

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

The Work  Spool Store command  provides a  subfile of  the spool  audit
records  (one  record  for  each spooled  file  in  the  Spool  Store).
Options   exist   to  delete,   display,  re-print,   or   display  the
attributes.

Options exist on the command to  select those records that you want  to
work with.   The options  are 'anded' together  so that a  spooled file
is only displayed if it meets all of the criteria.

   SPLSTOLIB     The  library  where  the  Spool Store  objects  exist.
                 *LIBL  is  the default.    A specific  library  may be
                 named.

   SPLF          The spooled  file name to  be selected.   The  default
                 is *ALL.

   JOB           The job name to be selected.  The default is *ALL.

   USER          The user to be selected.  The default is *ALL.

   JOBNBR        The job number  to be selected.  The  default is *ALL.

   FROMDATE      The  From Date when the spooled  file was opened to be
                 selected.   The default  is *START  meaning any  date.
                 If a  date is entered,  it must  be in job  format and
                 must be less than or equal to the To Date.

   TODATE        The  To Date when  the spooled  file was opened  to be
                 selected.  The default is  *END meaning any date.   If
                 a date is entered, it must be in job format.

   FROMTIME      The From Time when  the spooled file was opened  to be
                 selected.   The default is *START meaning  any time of
                 day.    If a  time is  entered, it  must be  in HHMMSS
                 format.  If the  From/To Dates are the same,  the From
                 Time  value must  be  less  than or  equal  to the  To
                 Time.

   TOTIME        The  To Time  when the spooled  file was  opened to be
                 selected.  The default is  *END meaning any time.   If
                 a time is entered, it must be in HHMMSS format.

   OUTQ          The  output queue  to  be selected.    The default  is
                 *ALL.    The parameter  is  independent  of the  OUTQL
                 parameter.

   OUTQL         The  output  queue  library  to  be  selected.     The
                 default  is *ALL.   The  parameter  is independent  of
                 the OUTQ parameter.

   OPNPGM        The  program  that opened  the  file  to be  selected.
                 The  default is  *ALL.   The parameter  is independent
                 of the OPNPGML parameter.

   OPNPGML       The library  of the program  that opened  the file  to
                 be selected.   The default is *ALL.   The parameter is
                 independent of the OPNPGM parameter.

   USRDTA        The  User Data to  be selected.  The  default is *ALL.

   FORMTYPE      The Form Type  to be selected.   The default is  *ALL.

   ACGCDE        The Accounting  Code to be  selected.  The  default is
                 *ALL.

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

The Delete  Spool Store command deletes the  objects used for the Spool
Store function.    All  data  will  be deleted  as  well  as  the  file
definitions.

   SPLSTOLIB     The library  where the Spool  Store objects exist.   A
                 specific library must be named.

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

The  Delete Spool Store  Detail command deletes  a spooled file  ID and
any  data.   This  is a  command interface  to  the 4=Delete  option on
WRKSPLSTO.

   STOID         The ID of the spooled file to be deleted.

   SPLSTOLIB     The  library  where the  Spool  Store  objects  exist.
                 The default is *LIBL.

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

The  Maintain Spool  Store command  provides a  cleanup method  for old
versions  in an *AUTO  type of Spool  Store.  The command  is not valid
on a *MANUAL type of Spool Store.

   NBRDAYS       The number of days  to retain existing spooled  files.
                 A number between 1 and 9999 must be used.

                 If  you want  to  retain all  the  spooled files  that
                 were  opened in the last  100 days, specify  100.  All
                 non-current spooled files that  were opened on a  date
                 that is older than 100 days will be deleted.

                 The number  of days  is a  required parameter.   Other
                 selection parameters  may be used  in conjunction with
                 the  number  of days  in an  'and' type  of selection.
                 For example, if  NBRDAYS(100) is specified along  with
                 SPLF(ABC)  and USER(SMITH),  only those  spooled files
                 named  ABC and owned  by SMITH that  were opened prior
                 to 100 days ago would be deleted.

   ACTION        The action to  be performed.   The default is  *DELETE
                 to cause deletion of the spooled data.

                 *CHECK  may  be  entered   to  cause  a  listing  that
                 describes what would have been deleted.

   SPLF          The spooled  file to be removed  from the Spool Store.
                 The default is *ALL  meaning that the other  selection
                 parameters determine what will be deleted.

                 A specific spooled  file name may be entered  in which
                 case  those  records which  match  the  value will  be
                 considered.

   JOB           The  job  to be  removed from  the  Spool Store.   The
                 default  is  *ALL meaning  that  the  other  selection
                 parameters determine what will be deleted.

                 A  specific job  name  may be  entered  in which  case
                 those   records  which   match   the  value   will  be
                 considered.

   USER          The user  to be  removed from  the Spool  Store.   The
                 default  is  *ALL  meaning that  the  other  selection
                 parameters determine what will be deleted.

                 A  specific user  name may  be  entered in  which case
                 those  records   which  match   the  value   will   be
                 considered.

   OUTQ          The output queue  to be removed from the  Spool Store.
                 The default  is *ALL meaning that  the other selection
                 parameters determine what will be deleted.

                 A  specific output queue name  may be entered in which
                 case those  records  which  match the  value  will  be
                 considered.

                 If an  OUTQ name is entered, a  library qualifier must
                 be  entered.  *ALL may be used  for the OUTQ name with
                 a specific library name for  all output queues in  the
                 library.

   FORMTYPE      The  form type  to be  removed from  the Spool  Store.
                 The  default is *ALL meaning  that the other selection
                 parameters determine what will be deleted.

                 A specific  form type  may be  entered in  which  case
                 those  records   which   match  the   value  will   be
                 considered.

   USRDTA        The  user data  to be  removed  from the  Spool Store.
                 The  default is *ALL meaning  that the other selection
                 parameters determine what will be deleted.

                 A specific  user data  value may be  entered in  which
                 case  those  records which  match  the  value will  be
                 considered.

   DETAIL        Whether  to list the  detailed spooled  files that are
                 deleted.  *YES  is the default  meaning one line  will
                 be printed for each deleted spooled file.

                 *NO  may  be  specified so  the  printed  output  will
                 contain only summary information.

   RGZ           Whether  to reorganize  the Spool  Store files.   *YES
                 is the default to  cause the physical files  SPLSTOAUD
                 and SPLSTODTL  to be reorganized.   This  reclaims the
                 space caused by deleting old versions.

                 *NO may be specified to not reorganize the files.

   SPLSTOLIB     The  library  where  the  Spool Store  objects  exist.
                 *LIBL  is  the default.    A specific  library  may be
                 named.

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

The Renumber Spool Store provides  a cleanup method when the  number of
IDs is approaching  the maximum of 4,294,967,250.  It  may also be used
to  delete non-matched detail records.   The user  must have all rights
to the SPLSTO  files to use the  command.  RNNSPLSTO  may only be  used
on an *AUTO type Spool Store.

If  a  failure   occurs  during  processing,  see   the  discussion  on
Renumbering.

   SPLSTOLIB     The  library where the  Spool Store objects  exist.  A
                 specific library must be named.

   WRKLIB        The library  where the  Spool  Store objects  will  be
                 copied to while  the re-numbering occurs.   A specific
                 library must  be named and  the library must  not have
                 any objects within it.

Recovery of Spool Store type (BADATR)
-------------------------------------

If  an escape message  occurs stating that the  SPLSTOAUD file does not
have a  User Attribute  of A  or  M, it  is due  to the  fact that  the
information  determining whether  an  *AUTO or  *MANUAL  type of  Spool
Store  exists has  been  lost or  replaced.   You  cannot use  the User
Attribute field of  the SPLSTOAUD  file as  it is used  to contain  the
type.

To recover, do the following:

  **   If  you  have an  *AUTO  type  of  Spool  Store, as  an  *ALLOBJ
       special authority user, enter:

            CHGOBJD2   OBJ(xxx/SPLSTOAUD) OBJTYPE(*FILE) USRATR('A')

  **   If  you  have a  *MANUAL  type  of Spool  Store,  as  an *ALLOBJ
       special authority user, enter:

            CHGOBJD2   OBJ(xxx/SPLSTOAUD) OBJTYPE(*FILE) USRATR('M')

Damage Recovery
---------------

In the  event  a  message directs  you  to  this section  or  you  have
experienced some  form of  damage, the  following is  recommended as  a
means of recovery:

If you  suspect damage to the programs or  display files (not data base
files), try re-creating the tool:

           CRTTAATOOL  TOOL(SPLSTO)

If  you have  or suspect some  form of data  damage (such  as a missing
logical file  or RPLPF  was unable  to complete  successfully during  a
reformat function), try the following:

  **   Create  a unique  library to  be used  for a  temporary function
       (termed TMPLIB in the sample code):

           CRTLIB      LIB(TMPLIB)

  **   Create the SPLSTO files in the unique library:

           CRTSPLARC   SPLSTOLIB(TMPLIB)

  **   Copy the physical file data from your current library.

           CPYF        FROMFILE(xxx/SPLSTOAUD) +
                         TOFILE(TMPLIB/SPLSTOAUD) MBROPT(*ADD)

           CPYF        FROMFILE(xxx/SPLSTODTL) +
                         TOFILE(TMPLIB/SPLSTODTL) MBROPT(*ADD)

       If  you are unable to  copy the data, you  will probably need to
       restore from your backup.

  **   Delete the spool store files in your current library:

           DLTSPLSTO   SPLSTOLIB(xxx)

  **   Use CRTDUPOBJ  to  duplicate  the objects  from  your  temporary
       library:

           CRTDUPOBJ   OBJ(*ALL) FROMLIB(TMPLIB) OBJTYPE(*ALL)
                       TOLIB(xxx) DATA(*YES)

  **   Delete the temporary library:

           DLTLIB      LIB(TMPLIB)

Try the WRK commands:

           WRKSPLARCD  SPLARCLIB(xxx)
           WRKSPLARC   SPLARCLIB(xxx)

If  the  commands  are  successful, you  should  be  able  to  continue
normally.

If  an old  format is  found, you will  be asked  to run  the CVTTAAFMT
command.

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

The User Attribute field may not be  used for the SPLSTOAUD file as  it
is used internally.

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

The following TAA Tools must be on your system:

     ADDDAT          Add date
     CHGOBJD2        Change object description 2
     CHKACTOBJ       Check active object
     CHKOBJ2         Check object 2
     CHKOBJ3         Check object 3
     CRTDUPPF        Create duplicate physical file
     CVTFRMSPLF      Convert from spooled file
     CVTOUTQ         Convert from output queue
     CVTSPLNBR       Convert spooled file number
     DLTDEPLGL       Delete dependent logicals
     DSPERRMSG       Display error message
     EDTVAR          Edit variable
     MOVLIBOBJ       Move library objects
     NBRCTR          Number counter
     PMTOPR          Prompt operator
     RTVDAT          Retrieve date
     RTVOBJAUT       Retrieve object authority
     RTVOBJCNT       Retrieve object count
     RTVOBJLST       Retrieve object list
     RTVSPLFA        Retrieve spooled file attributes
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDDIAGMSG      Send diagnostic message
     SNDSTSMSG       Send status message
     SNDESCMSG       Send escape message
     UPDPFILE        Update PFILE keyword

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

None, the tool  is ready to use.   You must first create a  Spool Store
with the CRTSPLSTO command.

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

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

   CRTSPLSTO     *CMD                   TAASPMR       QATTCMD
   CVTSPLSTO     *CMD                   TAASPMR2      QATTCMD
   DSPSPLSTO     *CMD                   TAASPMR3      QATTCMD
   RTVSPLSTO     *CMD                   TAASPMR4      QATTCMD
   PRTSPLSTO     *CMD                   TAASPMR5      QATTCMD
   WRKSPLSTO     *CMD                   TAASPMR6      QATTCMD
   DLTSPLSTO     *CMD                   TAASPMR7      QATTCMD
   MTNSPLSTO     *CMD                   TAASPMR8      QATTCMD
   CVTSPLSTO2    *CMD                   TAASPMR9      QATTCMD
   RNNSPLSTO     *CMD                   TAASPMR10     QATTCMD
   WRKSPLSTO2    *CMD                   TAASPMR11     QATTCMD
   DLTSPLSTOD    *CMD                   TAASPMR12     QATTCMD
   TAASPMRC      *PGM       CLP         TAASPMRC      QATTCL
   TAASPMRC2     *PGM       CLP         TAASPMRC2     QATTCL
   TAASPMRC3     *PGM       CLP         TAASPMRC3     QATTCL
   TAASPMRC4     *PGM       CLP         TAASPMRC4     QATTCL
   TAASPMRC5     *PGM       CLP         TAASPMRC5     QATTCL
   TAASPMRC6     *PGM       CLP         TAASPMRC6     QATTCL
   TAASPMRC7     *PGM       CLP         TAASPMRC7     QATTCL
   TAASPMRC8     *PGM       CLP         TAASPMRC8     QATTCL
   TAASPMRC9     *PGM       CLP         TAASPMRC9     QATTCL
   TAASPMRC10    *PGM       CLP         TAASPMRC10    QATTCL
   TAASPMRC11    *PGM       CLP         TAASPMRC11    QATTCL
   TAASPMRC12    *PGM       CLP         TAASPMRC12    QATTCL
   TAASPMRC21    *PGM       CLP         TAASPMRC21    QATTCL
   TAASPMRC22    *PGM       CLP         TAASPMRC22    QATTCL
   TAASPMRC26    *PGM       CLP         TAASPMRC26    QATTCL
   TAASPMRC36    *PGM       CLP         TAASPMRC36    QATTCL
   TAASPMRR2     *PGM       RPG         TAASPMRR2     QATTRPG
   TAASPMRR3     *PGM       RPG         TAASPMRR3     QATTRPG
   TAASPMRR4     *PGM       RPG         TAASPMRR4     QATTRPG
   TAASPMRR5     *PGM       RPG         TAASPMRR5     QATTRPG
   TAASPMRR6     *PGM       RPG         TAASPMRR6     QATTRPG
   TAASPMRR8     *PGM       RPG         TAASPMRR8     QATTRPG
   TAASPMRR10    *PGM       RPG         TAASPMRR10    QATTRPG
   TAASPMRR12    *PGM       RPG         TAASPMRR12    QATTRPG
   TAASPMRR23    *PGM       RPG         TAASPMRR23    QATTRPG
   TAASPMRR25    *PGM       RPG         TAASPMRR25    QATTRPG

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

   TAASPMRD      *FILE      DSPF        TAASPMRD      QATTDDS
   TAASPMRE      *FILE      DSPF        TAASPMRE      QATTDDS
   TAASPMRP      *FILE      PF          TAASPMRP      QATTDDS
   TAASPMRQ      *FILE      PF          TAASPMRQ      QATTDDS
   TAASPMRL      *FILE      LF          TAASPMRL      QATTDDS
   TAASPMRM      *FILE      LF          TAASPMRL      QATTDDS
   TAASPMRN      *FILE      LF          TAASPMRN      QATTDDS
   TAASPMRZ      *FILE      PF          TAASPMRP      QATTDDS

The SPLSTO library files are:

         SPLSTOAUD     PF      TAASPMRQ   - Arrival
         SPLSTOAUDL    LF      TAASPMRL      - Keyed by ID
         SPLSTOAUDM    LF      TAASPMRM      - Keyed by Date/Time
         SPLSTOAUDN    LF      TAASPMRN      - Keyed by Qualified SPLF
         SPLSTODTL     PF      TAASPMRP   - Keyed by ID and SEQ

The  TAASPMRZ file  does  not have  an  equivalent in  the  Spool Store
library.   It is  used only for  RPG compilations.   The normal file is
SPLSTODTL which uses the source TAASPMRP.

Structure
---------

CRTSPLSTO   Cmd
   TAASPMRC   CL pgm
     TAASPMRC21   CL pgm - Sets the user attribute

CVTSPLSTO   Cmd
   TAASPMRC2  CL pgm
     TAASPMRR2  RPG pgm
       TAASPMRC22  CL pgm

CVTSPLSTO2  Cmd
   TAASPMRC9  CL pgm

DSPSPLSTO   Cmd
   TAASPMRC3  CL pgm
     TAASPMRR3  RPG pgm - Display program
       TAASPMRD    DSP file
     TAASPMRR23 RPG pgm - Print program

RTVSPLSTO   Cmd
   TAASPMRC4  CL pgm

PRTSPLSTO   Cmd
   TAASPMRC5  CL pgm
     TAASPMRR5  RPG pgm
       TAASPMRR25  RPG pgm - Updates counts

WRKSPLSTO   Cmd
   TAASPMRC6  CL pgm
     TAASPMRR6  RPG pgm
       TAASPMRE    DSP file
       TAASPMRC26  CL pgm - Does PRTSPLSTO
       TAASPMRC36  CL pgm - Does WRKSPLSTO2
          WRKSPLSTO2  Cmd

WRKSPLSTO2  Cmd
   TAASPMRC11  CL pgm

DLTSPLSTO   Cmd
   TAASPMRC7  CL pgm

DLTSPLSTOD  Cmd
   TAASPMRC12 CL pgm
     TAASPMRR12  RPG pgm

MTNSPLSTO   Cmd
   TAASPMRC8  CL pgm
     TAASPMRR8  RPG pgm

RNNSPLSTO   Cmd
   TAASPMRC10  CL pgm
     TAASPMRR10  RPG pgm
					

Added to TAA Productivity tools July 10, 2000


Home Page Up to Top