Table of Contents

Search

  1. Preface
  2. PowerExchange Navigator Introduction
  3. Data Maps
  4. Data Maps for Specific Data Sources
  5. Copybooks
  6. Registration Groups and Capture Registrations
  7. Extraction Groups and Extraction Maps
  8. Personal Metadata
  9. Database Row Test
  10. PowerExchange Navigator Examples
  11. Appendix A: PowerExchange Functions for User-Defined Fields
  12. Appendix B: User Access Method Programs
  13. Appendix C: Application Groups and Applications
  14. Appendix D: Data Map Properties
  15. Appendix E: Record, Field, and Table Properties
  16. Appendix F: DTL__CAPXTIMESTAMP Time Stamps
  17. Appendix G: Trace for Creating a Memory Map When Importing a COBOL Copybook

Navigator User Guide

Navigator User Guide

CopyData

CopyData

Copies data from one field to another field. You can copy a source field to a target field or to the user-defined field that is specified for the expression that contains this function.
Syntax:
To copy data to a specific target field:
CopyData(
source_field
,
target_field
)
To copy data to the user-defined field that is specified for the expression:
CopyData(
source_field
)
The following table describes the parameters:
Parameter
Description
Datatype
source_field
The field to be copied. This field can be a real field or user-defined field of any datatype, or the data value that you want to copy enclosed in single quotation marks, such as '123456'.
Any datatype
target_field
The target field to which the source field data is copied. The target field length must be equal to or greater than the source field length. Otherwise, a conversion truncation error occurs.
If you specify a target field in the CopyData expression, do not also define a field name and attributes on the
Expr(
n
)
tab.
Any datatype
Usage Notes:
  • If you want to copy data to a specific target field, on the
    Expr(
    n
    )
    tab of the
    Record
    window, leave the
    Name
    value and field attributes in the expression row that includes this function blank. Otherwise, CopyData fails with RC=2660.
  • If you want to copy data to the user-defined field that is associated with the expression, on the
    Expr(
    n
    )
    tab of the
    Record
    window, enter the
    Name
    value and field attributes in the expression row that includes this function. Ensure that the field length is long enough to contain the copied data. Use any appropriate datatype. The function uses this datatype instead of the source field datatype for the user-defined field. If you have a nonrelational source field that is defined with multiple datatypes, you can use expressions to write the data to separate user-defined fields that each have a different datatype.

0 COMMENTS

We’d like to hear from you!