CPYUSRSPC       COPY USER SPACE                        TAASPCG

 The Copy User  Space command copies the  contents of one user  space to
 another.   An option exists  to control the result  if different length
 user  spaces exist.   By  default, the user  spaces must  have the same
 internal length.

 A typical command would be:

            CPYUSRSPC   FROMUSRSPC(xxx) TOUSRSPC(yyy)

 The internal length is determine  by use of an API which  retrieves the
 user space attributes.

 There is  no restriction on  the size of  the User Space to  be copied.
 Internally, a loop is used to move up to 9000 bytes at a time.

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

    FROMUSRSPC    The  qualified name  of the  User Space to  copy from.
                  The library  value  defaults to  *LIBL.   *CURLIB  may
                  also be used.

    TOUSRSPC      The  qualified name  of  the User  Space  to copy  to.
                  The  library  value defaults  to *LIBL.    *CURLIB may
                  also be used.

    ALWSIZDIF     A *YES/*NO  parameter  that  determines  if  the  User
                  Space  will be  copied  if the  To  User Space  has  a
                  different internal  length.  *NO is  the default which
                  prevents  the  copy unless  the  user spaces  have the
                  same internal length.

                  The  internal  length is  determined  by  use  of  the
                  QUSRUSAT  API  (via the  RTVUSRSPCA  TAA  Tool).   The
                  internal  length is  less than  the DSPOBJD  length of
                  the object.

                  *YES may be  specified to cause the  copy even if  the
                  lengths  differ.   If the  To User  Space is  shorter,
                  only  the  leftmost bytes  are  copied  from the  From
                  User Space.   If  the  To User  Space is  longer,  the
                  excess bytes remain unchanged.

    FORCE         A *YES/*NO  parameter that determines  if the  To User
                  Space  will be forced  to auxiliary storage  after the
                  copy.   The default  is *NO meaning  the normal paging
                  function occurs.

                  *YES may  be specified to  force the  contents of  the
                  To User Space to auxiliary storage.

    CRTUSRSPC     A *YES/*NO  parameter that  determines if the  To User
                  Space  will be  created.   The default is  *NO meaning
                  it must already exist.

                  *YES may be specified to create the To user space.

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

 None.

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

 The following TAA Tools must be on your system:

      CHKOBJ3         Check object 3
      EDTVAR          Edit variable
      RTVUSRSPCA      Retrieve user space attributes
      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
    ------        ----    ---------      ----------    ----------

    CPYUSRSPC     *CMD                   TAASPCG       QATTCMD
    TAASPCGC      *PGM       CLP         TAASPCGC      QATTCL

Added to TAA Productivity Tools April 1, 1998


Home Page

Last modified on March 10, 2014 © 1995, 2014 - TAA Tools, Inc.