TAA Tools

The  Copy  and Shift  Left  command  copies  a member  beginning  at  a
specified  position to  another member.   This  allows shifting  of the
data  to the left.   The user must  have *ALL authority  to the To file

A typical command would be:

                            MBROPT(*REPLACE) FIRSTPOS(19)

The first  member of  FILEA  would be  copied to  the  first member  of
FILEB.   Each record  in FILEA would  be read and  positions 19  to the
end  of the  record  would be  copied as  new records  to FILEB.   This
drops the first  18 bytes  of FILEA.   The To member  would be  cleared

For example, if FILEA had


FILEB would have


CPYSHFLFT escape messages you can monitor for

      TAA9891    No records exist in the From member
      TAA9892    The FIRSTPOS cannot be 0

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

Command parameters                                    *CMD

   FROMFILE      The qualified name  of the From file to be  used.  The
                 library  value defaults  to *LIBL.   *CURLIB  may also
                 be used.

   TOFILE        The qualified name  of the To  file to be  used.   The
                 library value  defaults to  *LIBL.   *CURLIB may  also
                 be used.

   FROMMBR       The  From member to  be copied  from.  The  default is

   TOMBR         The  To  member  to  be copied  to.    The  default is

   MBROPT        The Member option.

                 *NONE  is  the  default  and  will   cause  an  escape
                 message if used.

                 *ADD  may  be  specified  to  add records  to  the  To

                 *REPLACE  may be specified  to cause the  To member to
                 be cleared before adding records.

   FIRSTPOS      The first  position to  be used  to  shift left  from.
                 The  default  is  0  which  will  cause  an  error  if

                 If  position 10  is specified,  positions 10  thru the
                 end  of  the  record  are  copied  to  the  To  member
                 beginning  at  position  1.   The  first  9  positions
                 would be dropped.


*ALL rights are required to the To file.

A member may not be copied to itself.

The From and To files may not exceed 9999 bytes in length.


The following TAA Tools must be on your system:

     CHKOBJ3         Check object 3
     EDTVAR          Edit variable
     HLRMVMSG        HLL Remove message
     RSNLSTMSG       Resend last message
     RTVDBFA         Retrieve data base file attributes
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message
     SNDSTSMSG       Send status message


None, the tool is ready to use.

Objects used by the tool

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

   CPYSHFLFT     *CMD                   TAADBKZ       QATTCMD
   TAADBKZC      *PGM       CLP         TAADBKZC      QATTCL
   TAADBKZR      *PGM       RPG         TAADBKZR      QATTRPG

Added to TAA Productivity tools February 15, 2006

Home Page Up to Top