TAA Tools
CPYSHFSPLF      COPY SHIFT SPOOLED FILE                TAASPPV

The Copy Shift Spooled File  command allows you to shift the  data in a
spooled  file either  left  or right  and re-prints  the  spooled file.
The  file must  be capable  of being  copied by CPYSPLF  (this excludes
files with graphic characters).

A typical command would be:

             CPYSHFSPLF  FILE(ABC) NEWSPLF(*DFT) SHIFTLEFT(2)

The spooled file would be converted  to a data base file and  then read
by a program.

Because the  default is ALWTRUNC(*NO),  the first 2 characters  of each
line  would be checked  to ensure  they are blank.   If  not, an escape
message would be  sent preceded by  diagnostic messages which  describe
where the error  occurred.  If all  print lines are blank  in the first
2  positions, the  data would  be shifted  left 2  positions and  a new
spooled file would be output.

Since NEWSPLF(*DFT)  was  specified,  the new  spooled  file  would  be
named ABC2.

CPYSHFSPLF escape messages you can monitor for
----------------------------------------------

      TAA9891    ALWTRUNC(*NO) was specified and the command
                   failed with a truncation error.

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

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

   FILE          The name of  the spooled file  to shift the  data for.

   NEWSPLF       The  name  of the  new  spooled  file  to be  created.
                 *DFT  is the default meaning if  the FILE name is less
                 than 10 characters,  a 2 will be  added to the end  of
                 the  name.   For example,  if FILE(ABC)  is specified,
                 the new spooled file name would be ABC2.

                 A new name may be specified.

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

   SPLNBR        The file number  of the spooled  file.  This  defaults
                 to  *ONLY.    *LAST  or   a  specific  number  may  be
                 specified.

   SHIFTLEFT     The  number of  positions  to shift  left.   0  is the
                 default.   Either  SHIFTLEFT  or  SHIFTRIGHT  must  be
                 specified, but not both.

                 It must be a number between 0 and 100.

   SHIFTRIGHT    The number  of positions  to shift  right.   0 is  the
                 default.    Either  SHIFTLEFT  or SHIFTRIGHT  must  be
                 specified, but not both.

                 It must be a number between 0 and 100.

   ALWTRUNC      A  *YES/*NO value  for whether to  allow truncation of
                 data.

                 *NO is  the  default  to prevent  loss  of data.    If
                 SHIFTLEFT(2)  is specified,  each  print  line in  the
                 spooled   file  must  be   blank  in   the  first  two
                 positions.

                 If SHIFTRIGHT(2)  is  specified, each  print  line  in
                 the  spooled  file  must  be blank  in  the  last  two
                 positions  of the page width.   The page  width of the
                 spooled  file  is  determined  by  accessing  the  the
                 spooled  file  attributes and  using  the  page  width
                 value.  See also the PAGWTH parameter.

                 *YES may be specified to allow truncation.

   PAGWTH        The  page  width to  use  for  the  new spooled  file.
                 *SAME  is the  default meaning  to use  the page width
                 of the spooled file named in the FILE parameter.

                 If entered, the value must be between 1 and 378.

                 If  you  are  using  SHIFTRIGHT,  there   may  not  be
                 sufficient room  to move the  data without truncation.
                 Using  a PAGWTH  value will  allow a wider  page width
                 without truncation.

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

The file must  be capable of  being copied by  CPYSPLF.  This  excludes
spooled files containing graphics.

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

The following TAA Tools must be on your system:

     CHKSPLF         Check spooled file
     EDTVAR          Edit variable
     RMVMSGKEY       Remove message key
     RSNLSTMSG       Resend last message
     RTVSPLFA        Retrieve spooled file attributes
     RTVVALA         Retrieve value attributes
     SNDCOMPMSG      Send completion message
     SNDDIAGMSG      Send diagnostic message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message

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

None, the tool is ready to use.

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

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

   CPYSHFSPLF    *CMD                   TAASPPV       QATTCMD
   TAASPPVC      *PGM       CLP         TAASPPVC      QATTCL
   TAASPPVR      *PGM       RPG         TAASPPVR      QATTRPG
					

Added to TAA Productivity tools January 15, 2014


Home Page Up to Top