TAA Tools
PRTREVERSE      PRINT REVERSE                          TAASPOH

The Print Reverse command  prints a spooled file in  reverse page order
by creating  a new spooled  file.  For  example, if 3  pages exist, the
new  spooled file  would contain page  3 as the  first page,  page 2 as
the second page, and  page 1 as the 3rd  page.  The lines per  page are
printed  in the  same  order as  they  appear in  the original  spooled
file.

A typical command would be:

             PRTREVERSE   FILE(ABC)

The  ABC  spooled file  from  the current  job would  be  re-printed in
reverse page order so that the  last page would become the first  page.
The  NEWSPLF parameter  default  is *DFT  which means  a  '2' would  be
placed  at the  end of  the name  causing  the new  spooled file  to be
named ABC2.

PRTREVERSE escape messages you can monitor for
----------------------------------------------

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

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

   FILE          The  name  of  the  spooled  file  to  be  printed  in
                 reverse order.

   TOOUTQ        The qualified name  of the output queue where  the new
                 spooled file  will be written.   The default  is *PRTF
                 meaning  to  use  the  output  queue  defined  for the
                 printer file as specified on the TOPRTF parameter.

                 If  an  output queue  is  specified,  a  blank  output
                 queue  library name  defaults to  *LIBL.   *CURLIB may
                 be   specified.     Using   other  than   the  default
                 overrides the value specified in the printer file.

                 If you take  the default for  both TOOUTQ and  TOPRTF,
                 the spooled  file is  written to  the QSYSPRT  printer
                 file.   The QSYSPRT file is shipped  with a default of
                 *JOB for the OUTQ  parameter meaning the output  queue
                 associated with your job would be used.

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

   SPLNBR        The  spooled  file  number.    The default  is  *ONLY.
                 *LAST  may be specified or  a specific 4 digit number.

   TOPRTF        The qualified name of  the printer file to be  used to
                 reprint  the  data.   The  default  is  QSYSPRT.   The
                 library   defaults   to  *LIBL.      *CURLIB   may  be
                 specified.

                 Most of the attributes from  the printer file will  be
                 used  except  for  OUTQ  (may  be  overridden  by  the
                 TOOUTQ   parameter),   SPLFNAME   (from  the   NEWSPLF
                 parameter), and  USRDTA (PRTREVERSE  is used).    Page
                 size, overflow  line, page width,  LPI, CPI,  etc come
                 from the spooled file being copied.

                 You may  use an OVRPRTF  command in your  job prior to
                 using  PRTPAGRNG  to specify  individual  printer file
                 attributes.  The  attributes will be  merged according
                 to the rules of override processing.

                 For  example,  you could  use  an  OVRPRTF command  to
                 file  QSYSPRT  and specify  the value  for  the COPIES
                 parameter.

   NEWSPLF       The new spooled  file name  to be used.   The  default
                 is  *DFT  which  means  the  same  name  as  the  FILE
                 parameter  will be used  with a  2 added to  the name.
                 For  example,  if   the  original   spooled  file   is
                 PAYROLL, the new spooled file would be PAYROLL2.

                 The value  of this  parameter overrides  the value  of
                 the  SPLFNAME   parameter  specified  in   the  TOPRTF
                 printer file.

                 *DFT  is  only  valid  when  the  name  is  9  or less
                 characters.

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

The print file width may not exceed 250 bytes.

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

The following TAA Tools must be on your system:

     RTVSPLFA     Retrieve spooled file attributes
     SNDCOMPMSG   Send completion message
     SNDESCINF    Send escape information
     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
   ------        ----    ---------      ----------    ----------

   PRTREVERSE    *CMD                   TAASPOH       QATTCMD
   TAASPOHC      *PGM       CLP         TAASPOHC      QATTCL
   TAASPOHR      *PGM       RPG         TAASPOHR      QATTRPG
					

Added to TAA Productivity tools June 30, 2007


Home Page Up to Top