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

Fragment

Fragment

Splits and distributes the subfields of a source field among two or more specified target fields.
The amount of data that is distributed to each target field is determined by the length of the target fields. For example, if the first target field is a CHAR field with a length of two characters, the first two characters of the source field is copied to the target field. If the second target field is a CHAR field with a length of eight characters, the next eight characters of the source field is copied to that target field.
Syntax:
[
result
=]Fragment(
source_field
,
target_field1
,
target_field2
[,
...
])
The following table describes the parameters:
Parameter
Description
Datatype
result
Optional.Returns one of the following values:
  • 0. The source field was fragmented successfully to the target field or fields.
  • 1. All data in the source field was not distributed to target fields.
  • 2. The last target field is of a variable datatype and was not populated with data to its maximum length.
  • 3. Some target fields were not populated with data and were set to null.
-
source_field
Field to be fragmented.
A real or user-defined field of any datatype, or a value enclosed in single quotes
target_field1
Target field into which to copy fragment from the source field.
A user-defined field of any datatype except a variable datatype
target_field2
[,
...
]
One or more additional target fields into which to copy fragments from the source field.
A user-defined field of any datatype except a variable datatype. The last target field can be of a variable datatype.
If the last target field is not variable and its length exceeds the length of the remaining data in the source field, the target field is populated with null and the return code is 0. However, if you make the last target field variable, it is populated with data, and the return code is still 0, even if full length of the variable field is not populated.

0 COMMENTS

We’d like to hear from you!