TAA Tools
CPYFRMOUTQ      COPY FROM OUTPUT QUEUE                 TAASPLM

The  Copy From  Output  Queue  command  provides a  method  of  storing
spooled files  in a data base file  so they can be printed  later.  The
type  of spooled  output that  can be  copied is  limited to  normal DP
type of  output (e.g.   no graphics)  and some  spooled attributes  are
not  converted.  See  the comments  in the  restriction section.   Also
see CVTFRMOUTQ which uses APIs and has no restrictions.

A typical command would be entered as:

     CPYFRMOUTQ      OUTQ(xxxxx) OUTFILE(yyyyy)

Each  spooled file  in the  output queue becomes  a separate  member in
the named  data base  file.   An option  exists to  delete the  spooled
files after they are copied.

The companion  command (Copy To Output  Queue) copies the  members from
the  data base  file and  prints them to  an output  queue.   A typical
command would be:

     CPYTOOUTQ       DBFILE(yyyyy) OUTQ(xxxxx)

The default causes all of  the members of the file  to be printed.   An
option exists to print a specific member.

When CPYFRMOUTQ  is used, a  member is created  for each spooled  file.
The  member name becomes  MBR0001, MBR0002, ...   MBR9999.   The member
text   description  includes  the  original   spooled  file  name,  the
qualified job name that  created the spooled output, and  the date/time
the spooled  file was opened.   If you  want to print a  single member,
use  DSPFD *MBRLIST  to find  the text description  for the  member you
wish to print.  Then specify the member name assigned.

The file created  is assigned  a record length  of 211 to  allow for  a
210 wide print line  and the first character forms  control.  A shorter
print line length (e.g.  132) will be handled properly.

If you  are printing a record width greater than  132, you will need to
specify either the PRTFILE parameter to  use a file other than  QSYSPRT
or the PRTWIDTH parameter.

When CPYTOOUTQ  is used,  the spooled  file name  becomes the  original
name.   However, the  owner of the  spooled file  is the user  who runs
the CPYTOOUTQ command.

CPYSPLF  is used to  copy the spooled  files to the  data base members.
The first  character forms  control option  (FCFC) is  used to  provide
the original spacing and skipping.

When  the  CPYTOOUTQ  function is  used,  CPYF  is  used to  print  the
information.   A printer file must be  used.  CPYTOOUTQ defaults to use
QSYSPRT.  See the restrictions section  for the type of file which  can
be used.

When CPYFRMOUTQ  is used,  the TAA  Tool CVTOUTQ  is used to  determine
the spooled  files in the output queue.  When  CPYSPLF is run, there is
a possibility that  the spooled  file no longer  exists or  the job  no
longer exists.   If  either of  these occurs, a  diagnostic message  is
sent, but the CPYFRMOUTQ command will complete normally.

Authority
---------

The commands all allow public use.

To  use CVTFRMOUTQ,  the user must  be authorized  to the  output queue
and  all spooled files.  If the  file named on the CRTOUTFILE parameter
already exists, the user must be authorized to add a member.

To use CVTFRMSPLF,  the user must  be authorized to  the file named  on
the CVTSPLP  parameter, the  output queue where  the spooled  file will
be  created, and  have *USE  authority to the  TAACVTSPLF authorization
list.

Using an existing file
----------------------

By default, the file  named for the OUTFILE  parameter must not  exist.
You may specify CRTOUTFILE(*NO) to add members to the same file.

When adding  members to  an existing  file, the  member names  assigned
are based  on the last member in the file.   The naming convention must
be MBRnnnn where nnnn is a consecutively assigned number.

Exceptions
----------

The system CPYSPLF  command does not  convert every type  of file.   If
an error  occurs, the file  is bypassed and  a diagnostic message  will
exist.

Use of CPI(15)
--------------

It  is  valid to  use  a  printer  width of  up  to  210 positions  and
CPI(15).   When CPYSPLF  is used to  write to the  data base member, it
is not aware of the CPI used.   In general, you do not want  to mix CPI
values on  the same output queue.   The default printer  file used with
CPYTOOUTQ  is QSYSPRT.   QSYSPRT must match  the original specification
of the file or  you must use a  different printer file with  CPYTOOUTQ.

If you  have multiple  CPI types  on the  same output  queue, you  will
need  to specify  an individual  member name for  each spooled  file so
the proper printer file can be used.

CPYFRMOUTQ Command Parameters                         *CMD
-----------------------------

   OUTQ          The qualified  output  queue  to  be  copied.    Every
                 spooled file  (except those in  OPN status)  is copied
                 to  the named data  base file.   The  library defaults
                 to *LIBL.

   OUTFILE       The  output file to hold the  spooled files.  The file
                 will be  created with a  length of  211 bytes to  hold
                 the FCFC character  and 210 bytes of print  line.  The
                 library  defaults  to *CURLIB.    Shorter  width print
                 line data will work properly.

   CRTOUTFILE    A *YES/*NO  value  for  whether  to  create  the  file
                 named in the  OUTFILE parameter.  The  default is *YES
                 (this is  the compatible function for  how the command
                 was originally written).   If *YES  is specified,  the
                 file must not exist.

                 *NO  may be  specified  to  add  members to  the  same
                 file.   The member name assigned is  based on the last
                 member  found in the  file.  Member  names must follow
                 the   convention  of   MBRnnnn   where   nnnn   is   a
                 consecutively assigned number.

   SEQUENCE      A *YES/*NO  value that  determines if the  sequence of
                 records will be sorted before creating members.

                 *NO  is the default.   The members will  appear in the
                 same  sequence  as  the  spooled  files  displayed  by
                 WRKOUTQ.

                 *YES may  be specified  to sequence the  spooled files
                 by  job number and  the open date/time  so the members
                 will be written in that sequence.

   DLTSPLF       A *YES/*NO  value for  whether to  delete the  spooled
                 file after it  has been copied.   The default  is *NO.

CPYTOOUTQ Command Parameters                          *CMD
----------------------------

   DBFILE        The qualified  name of the  data base file  to be used
                 to  print from.   The file  must have  been created by
                 the  CPYFRMOUTQ  command.   The  library  defaults  to
                 *LIBL.

   OUTQ          The  qualified output  queue to  be printed  to.   The
                 library defaults to *LIBL.

   PRTF          The  qualified name  of  the printer  file to  be used
                 for printing.   An  externally described  file  cannot
                 be  used.   The file  must  have the  same file  level
                 characteristics  as  the original  file  such  as form
                 length, overflow  line and  LPI.   The CPI  value  may
                 differ.     The  form  width   may  be   shorter,  but
                 truncation will occur.

   MBR           The member to be printed.  The default is *ALL.

   PRTWIDTH      The record  width of the  print line.   The default is
                 *PRTF.     The  record  width   of  the  QSYSPRT  file
                 (default for  PRTFILE) is 132.   If  the spooled  file
                 has a length  greater than 132 you will  need to use a
                 specific  print  file  or  specify  the  record  width
                 desired.

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

  **   The copy function works well for  normal DP type of output.   No
       advanced  printer functions  or other  unique printer  specifics
       can exist.

  **   The  printer file  specified cannot  be an  externally described
       file.   The file  level characteristics  such as  LPI,  overflow
       line, form size etc cannot be changed.

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

The following TAA Tools must be on your system.

     CHKJOBCTL    Check job control
     CVTOUTQ      Convert output queue
     EDTVAR       Edit variable
     SNDCOMPMSG   Send completion message
     SNDDIAGMSG   Send diagnostic message
     SNDESCMSG    Send escape message
     SNDSTSMSG    Send status message

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

None.

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

None, the tool is ready to use.

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

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

   CPYFRMOUTQ    *CMD                       TAASPLM       QATTCMD
   CPYTOOUTQ     *CMD                       TAASPLM2      QATTCMD
   TAASPLMC      *PGM           CLP         TAASPLMC      QATTCL
   TAASPLMC2     *PGM           CLP         TAASPLMC2     QATTCL

Structure
---------

CPYFRMOUTQ    Cmd
  TAASPLMC      CL

CPYTOOUTQ     Cmd
  TAASPLMC2     CL
					

Added to TAA Productivity tools April 1, 1995


Home Page Up to Top