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

Defining Table Properties in a Data Map to Normalize an Array - Example

Defining Table Properties in a Data Map to Normalize an Array - Example

To define the layout of multiple records one time rather than multiple times, define an array with multiple occurrences. Then, define table properties in the data map to normalize the array and produce the correct output from the source file.
In this example, you add user-defined fields to the data map. These fields invoke the PowerExchange GenVRowKey and GetSeqWithinLevel functions, which demonstrate the normalization of the array in the database row test output.
This example shows how to complete the following tasks:
  1. Add a data map for a sequential flat file.
    When you add the data map, you import a COBOL copybook that defines an array with multiple occurrences into the data map.
  2. Add user-defined fields to the data map.
    These user-defined fields invoke the PowerExchange GenVRowKey and GetSeqWithinLevel functions, which demonstrate the normalization of the array in the database row test output.
    For a source row that contains an array, the GenVRowKey function generates multiple table rows identified by unique row numbers.
    The GetSeqWithinLevel function gets the sequence number of a record in the current hierarchical level.
  3. Define table properties that normalize the array in the database row test output.
  4. Run a database row test to display the results of normalization.
    In the database row test output, one row appears for each occurrence in the array.
In this example, you use the demo2.dat data file and the demo2.cob copybook to create the demo.map2array data map.
The demo2.cob copybook uses the following OCCURS clause to define an array with multiple occurrences:
04 ITEM OCCURS 3 DEPENDING ON ITEMCT PIC X(15).

0 COMMENTS

We’d like to hear from you!