TAA Tools
CVTWRKSPLF     CONVERT WRKSPLF TO A DATA BASE FILE      TAASPLH

The Convert WRKSPLF  command creates the  data base file  WRKSPLFP with
one  record per spooled  file.  The  information is accessed  using the
API  QGYOLSPL to simulate  the WRKSPLF command being  written to a data
base file.   This allows  you to  automate several functions  involving
spooled files.

If  you  are only  interested  in  the spooled  files  for  a job,  use
CVTJOBSPLF.

A typical command would be:

   CVTWRKSPLF    OUTLIB(QTEMP)

The  command creates  a file  named WRKSPLFP in  QTEMP with  one record
for each spooled file.   You can  then read the file  in a CL or  other
HLL program.

QGYSERVER Job
-------------

The QGYOLSPL API used by CVTWRKSPLF causes the system QGYSERVER job
to be started in the same subsystem where CVTWRKSPLF is running.
The server job is ended when CVTWRKSPLF ends.

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

   USER          The user  you want  to select on.   This  parameter is
                 the  same  function  as  the  USER  parameter  on  the
                 WRKSPLF command.

   FORMTYPE      The form type you want  to select on.  This  parameter
                 is  same  function   as  the  FORMTYPE   parameter  on
                 WRKSPLF.

   USRDTA        The user  data you want to select  on.  This parameter
                 is  same function as the  USRDTA parameter on WRKSPLF.

   FILE          The  name or  generic  name  of the  spooled  file  to
                 select  on.   The  default  is  *ALL  for all  spooled
                 files.

   JOB           The  job name of the  spooled file to select  on.  The
                 default is *ALL for all jobs.

   JOBNBR        The job  number  of the  spooled  file to  select  on.
                 The default is *ALL for all job numbers.

   OUTQ          The  qualified name  of the  output  queue to  select.
                 The  output queue name  defaults to *ALL.   A specific
                 or generic name may be entered.

                 The qualified  library  name  defaults  to  *ALL.    A
                 specific library name, or *CURLIB may be used.

   NBRPAGES      The number  of  pages in  the spooled  file to  select
                 on.   The  default is  *ALL for  any number  of pages.
                 If  a  number is  entered, any  spooled files  with at
                 least that number of pages are selected.

   SPLFSIZE      The size of  the spooled file  in bytes to select  on.
                 The  default is *ALL  for any  size.   If a  number is
                 entered,  any spooled  files with  at least  that size
                 in bytes are selected.

   PGM           The name of  the program and  library that opened  the
                 spooled file  to select on.   The default is  *ALL for
                 both  the program  and  library name.   If  a  name is
                 entered in  either  or  both  parameters,  only  those
                 spooled files  that were opened  by that  program name
                 and library will be selected.

                 Each  part   of  the  qualified   name  is  considered
                 separately.    For  example,  if  a  program  name  is
                 entered with  a  library value  of  *ALL, any  spooled
                 file  opened by  that  program name  will be  selected
                 regardless of the library the program exists in.

   HOLD          Whether  to  select  on  the  spooled  files that  are
                 held.  The  default is  *ALL for  whether the  spooled
                 file is held or not.

                 If  *YES is  entered, only  those  spooled files  that
                 are held will be selected.

                 If *NO  is entered, only those  spooled files that are
                 not held will be selected.

   SAVF          Whether to  select  on  the  spooled  files  that  are
                 specified  as SAVE(*YES).   The  default  is *ALL  for
                 whether the spooled file is saved or not.

                 If  *YES is  entered,  only those  spooled  files that
                 are saved will be selected.

                 If  *NO is entered, only  those spooled files that are
                 not saved will be selected.

   PERIOD        The Begin/End Date/Time values to select on.

                 The  'Beginning   time'  value   defaults  to   *AVAIL
                 meaning the  Begin Time value  is not considered.   If
                 a  time is  entered,  it is  used in  conjunction with
                 the 'Beginning Date' to determine selection.

                 The  'Beginning   Date'  value   defaults  to   *BEGIN
                 meaning the  Begin Date value  is not considered.   If
                 a  date is  entered, it  is  used in  conjunction with
                 the 'Beginning  Time'  to determine  selection.    The
                 special value *CURRENT  may be entered to  mean todays
                 date.

                 The  'Ending time'  value defaults  to  *AVAIL meaning
                 the  End Time value  is not considered.   If a time is
                 entered, it  is used in  conjunction with the  'Ending
                 Date' to determine selection.

                 The 'Ending  Date' value defaults to  *END meaning the
                 End  Date  value is  not  considered.   If  a  date is
                 entered, it is  used in  conjunction with the  'Ending
                 Time'  to  determine  selection.   The  special  value
                 *CURRENT may be entered to mean todays date.

   EXPDATE       The  expiration   date  of  the  spooled  file.    The
                 default is *ALL  to select  those with  or without  an
                 expiration date.

                 A  specific date  may  be  entered  in job  format  to
                 select   any  spooled   files  based   on   the  EXPOP
                 parameter.    When  a  date  is  entered,  any spooled
                 files  that  do  not  have  an  expiration   date  are
                 implicitly bypassed.

                 If  the expiration date  of a  spooled file  is 010109
                 (MDY)  and  the  EXPDATE  parameter  is  020109 (MDY),
                 EXPOP(*LT or *LE) would select the spooled file.

                 *NONE may  be  entered  to select  the  spooled  files
                 that  do not  have  an  expiration date.    EXPOP(*EQ)
                 must be used.

   EXPOP         The expiration  date operator.  *EQ  is the default to
                 select any spooled  files equal to  the EXPDATE  date.
                 This  parameter   is  ignored   if  EXPDATE(*ALL)   is
                 specified.

                 The other  operators are *NE,  *GE, *GT, *LE,  or *LT.

   OUTLIB        The  library  in  which  the  WRKSPLFP  file  will  be
                 placed.  The default  is *LIBL.  If the  WRKSPLFP file
                 does not  already exist, a library  must be specified.

   OUTMBR        The  member of the WRKSPLFP  file to be used.   If the
                 member does not  exist, it is added.   The default  is
                 WRKSPLFP.

   REPLACE       A  *YES/*NO value  for whether  the  member should  be
                 cleared before  writing records into it.   The default
                 is *YES.

File format
-----------

The file name that is output is WRKSPLFP.

The model file used is TAASPLHP with a format name of SFREC.

To see the field names used:

       DSPFFD    TAASPLHP

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

None.

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

The following TAA Tools must be on your system:

      EDTVAR        Edit variable
      CRTUSRSPC     Create user space
      RTVUSRSPCI    Retrieve user space initialization
      SNDCOMPMSG    Send completion message
      SNDESCMSG     Send escape message

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

None, the tool is ready to use.

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

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

   CVTWRKSPLF    *CMD                      TAASPLH        QATTCMD
   TAASPLHP      *FILE         PF          TAASPLHP       QATTDDS
   TAASPLHC      *PGM          CLP         TAASPLHC       QATTCL
   TAASPLHC2     *PGM          CLP         TAASPLHC2      QATTCL
   TAASPLHR      *PGM          RPGLE       TAASPLHR       QATTRPG
					

Added to TAA Productivity tools April 1, 1995


Home Page Up to Top