TAA Tools
CHGUSRSPC       CHANGE USER SPACE                      TAASPCI

The Change User  Space command allows you  to change the contents  of a
user  space.   A  maximum of  5000  bytes can  be changed  on  a single
command.  A start position must be named and an optional length.

A typical command would be:

             CHGUSRSPC    USRSPC(xxx) VALUE(...)

The default for the position to start the change is 1.

The  default for  the length is  *LASTNONBLK which means  that the last
non-blank is found in the  VALUE and this determines the length  of the
change.

If  a length is  specified, it  must be  equal to  or greater  than the
number  of  bytes defined  by  the last  non-blank  in the  data.   For
example,  if   VALUE(ABCDEGH)   is  specified,   you   cannot   specify
LENGTH(4).  The length would have to be 7 or greater.

If the  length specified exceeds  the length  of the value  (as defined
by the  last non-blank), the excess bytes will be  set to blanks in the
User Space.

You  may  optionally  initialize  the  remaining  bytes  following  the
change to the initial  value specified when the user  space was created
(the value  may be changed by an  API).  You may see  the initial value
with the DSPUSRSPCA TAA command.

If the following command was run:

             CHGUSRSPC    USRSPC(xxx) VALUE('TAA Tools are great')

The  command  would  cause a  change  beginning in  position  1 through
position 19  (the  length of  the VALUE  data as  defined  by the  last
non-blank).   By default,  no other  bytes in the  User Space  would be
changed.

Using the PAD parameter as:

             CHGUSRSPC    USRSPC(xxx) VALUE('TAA Tools are great')
                            PAD(*YES)

would  cause  positions  1  - 19  to  be  changed  to  the VALUE  data.
Positions 20 through  the end  of the  User Space would  be changed  to
the initial value as defined for the User Space.

If the following command was run:

             CHGUSRSPC    USRSPC(xxx) VALUE('TAA Tools are great')
                            LENGTH(25) PAD(*YES)

Bytes 1  - 19 would  contain the VALUE  data.  Bytes  20 - 25  would be
set to  blanks.  Positions 26  through the end of  the User Space would
be set to the initial value as defined for the User Space.

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

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

   VALUE         The  data to  be placed into  the User  Space.   Up to
                 5000 bytes may be entered.

                 The  length of the data  is determined by the last-non
                 blank found.   This  length cannot  exceed the  length
                 specified for the LENGTH parameter.

                 If  the  value  specified  for  the  LENGTH  parameter
                 exceeds  the length of  the data,  the remaining bytes
                 of the length will be set to blanks.

   STRPOS        The position to  begin the change  in the User  Space.
                 The default is 1.

                 The length  to be  changed cannot exceed  the internal
                 size of the User Space.

   LENGTH        The  length of the  data to  be changed.   The default
                 is  *LASTNONBLK  which   means  the   VALUE  data   is
                 searched  from  the  right  for   the  last  non-blank
                 character.   This determines the number  of bytes that
                 will be changed in the User Space.

                 A  specific value may be  entered.  See the discussion
                 with the VALUE parameter.

   PAD           A  *YES/*NO   value  for  whether   to  pad  out   the
                 remainder  of the  User Space  with the  initial value
                 as  defined for  the User  Space.   This value  can be
                 displayed with the DSPUSRSPCA TAA command.

                 The default is  *NO which  means that  only the  bytes
                 defined by  the LENGTH  parameter will  be changed  in
                 the User Space.

                 *YES  may be  specified to  pad  out the  remainder of
                 the User Space  with the initial  value.  This  occurs
                 for  the  bytes  after those  changed  by  the  LENGTH
                 parameter.

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
   ------        ----    ---------      ----------    ----------

   CHGUSRSPC     *CMD                   TAASPCI       QATTCMD
   TAASPCIC      *PGM       CLP         TAASPCIC      QATTCL
					

Added to TAA Productivity tools April 1, 1998


Home Page Up to Top