TAA Tools

The Copy User Space to  Data Base File command copies data  from a user
space  to a  data base  file.  The  data base  file may  be up  to 9999
bytes  in length.   An optional  parameter allows copying  of less than
the full space.  If the last  data in the space is not the  full length
of a record, blanks will be appended.

A typical command would be:


If  the size  of the  user space  ABC is  20,480 bytes  and  the record
length  of file DEF is 100,  204 full records would  be written and one
partial record of 80 bytes.   The DEF file would be cleared before  any
records were written.

CPYSPCDBF escape messages you can monitor for

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

CPYSPCDBF Command parameters                          *CMD

   USRSPC        The  qualified name  of the  user space  to copy  data
                 from.    The  library  value  defaults  to *LIBL.    A
                 specific library or *CURLIB may also be used.

   FILE          The qualified  name  of the  file  to write  the  user
                 space data to.   The library value defaults  to *LIBL.
                 A specific library or *CURLIB may also be used.

   MBR           The  member of  the  file to  write records  to.   The
                 default  is *FIRST.   A  specific member  or *LAST may
                 be specified.

   LASTPOS       The last  position in  the  user space  to be  copied.
                 *ALL  is the  default meaning  the total  size  of the
                 user  space.    A  specific  position  may be  entered
                 within the user space to  be the last character to  be

   REPLACE       A *YES/*NO value  for whether to replace  any existing
                 data in the member coped to.

                 *NO  is the  default to  add  records to  any existing

                 *YES may  be  specified  to clear  the  member  before
                 adding new records.


  **   The file length must be less than or equal to 9999.


The following TAA Tools must be on your system:

     CHKOBJ3         Check object 3
     EDTVAR          Edit variable
     RSNLSTMSG       Resend last message
     RTVDBFA         Retrieve data base file attributes
     RTVUSRSPC       Retrieve user space
     RTVUSRSPCA      Retrieve user space 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
   ------        ----    ---------      ----------    ----------

   CPYSPCDBF     *CMD                   TAASPCX       QATTCMD
   TAASPCXC      *PGM       CLP         TAASPCXC      QATTCL
   TAASPCXC2     *PGM       CLP         TAASPCXC2     QATTCL
   TAASPCXR      *PGM       RPG         TAASPCXR      QATTRPG

Added to TAA Productivity tools April 15, 2013

Home Page Up to Top