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

Step 1. Add a Data Map that Contains an Array Defined with Multiple Occurrences

Step 1. Add a Data Map that Contains an Array Defined with Multiple Occurrences

In this step, you add a data map for a sequential flat file and import a COBOL copybook that defines an array with multiple occurrences into the data map.
  1. On the
    Resources
    tab in the
    Resource Explorer
    , click
    Add 
    Data Map
    .
  2. In the
    Name
    dialog box, enter the following information:
    • In the
      Schema Name
      box, enter
      demo
      .
    • In the
      Data Map Name
      box, enter
      map2array
      .
    • Select the
      Import Record Definitions
      option.
    • In the
      Access Method
      list, select
      SEQ
      .
  3. Click
    Next
    .
  4. In the
    SEQ Access Method
    dialog box, enter the following information:
    • In the
      File Name
      box, click the Browse button to browse to the demo2.dat file in the examples directory.
    • In the
      Record Format
      area, select the
      Field Separator
      option and enter the comma (,) character in the
      Field Separator
      box.
      The demo2.dat data file is a comma (,) separated file.
  5. Click
    Finish
    .
  6. In the
    Import Copybook - Source Details
    dialog box, enter the following information:
    • In the
      Source
      area, select
      Local
      .
    • In the
      Type
      list, select
      COBOL
      .
    • In the
      Column Range
      area, enter
      7
      in the
      Start
      box and
      72
      in the
      End
      box.
  7. Click
    Next
    .
  8. In the
    Import Copybook - Local Cobol Details
    dialog box, enter the following information:
    • Click the Browse button to browse to the demo2.cob file in the examples directory.
    • To view the copybook, click
      Preview
      . The copybook includes the following OCCURS clause to define an array with multiple occurrences:
      04 ITEM OCCURS 3 DEPENDING ON ITEMCT PIC X(15).
  9. Close the preview window. In the
    Import Copybook - Local Cobol Details
    dialog box, click
    Next
    .
  10. In the
    Import Copybook - Configuration Details
    dialog box, review the selected actions for imported records, fields, and tables and click
    Finish
    .
  11. In the
    Import Copybook Information
    window, review the information for the import and click
    OK
    .
  12. To import the RECORD_IN record, click
    OK
    in the
    Record Definition
    dialog box.
  13. To import the fields in the record, click
    OK
    in the
    Field Definition
    dialog box for each field.
  14. To import the RECORD_IN table, click
    OK
    in the
    Table Definition
    dialog box.
    The
    Cobol Import
    window displays the imported copybook. The
    Copybook Message Log
    window displays the results of the import operation.
  15. Close the
    Cobol Import
    and the
    Copybook Message Log
    windows.
  16. On the
    Resources
    tab in the
    Resource Explorer
    , select the RECORD_IN table and click
    File
    Database Row Test
    .
    The PowerExchange Navigator displays an error message that indicates that the RECTYPE field in the RECORD_IN record is an invalid type for a delimited data file. Additionally, the ITEMCT field is an invalid type.
  17. Change the datatype of the RECTYPE and ITEMCT fields by completing the following actions:
    • In the
      Record
      window for the RECORD_IN record, double-click the RECTYPE field.
      In the
      Field Properties
      dialog box, select a
      Field Type
      of NUMCHAR. Enter 2 in the
      Length
      box. Click
      OK.
    • In the
      Record
      window, double-click the ITEMCT field.
      In the
      Field Properties
      dialog box, select a
      Field Type
      of NUMCHAR. Enter 1 in the
      Length
      box. Click
      OK.
  18. On the
    Resources
    tab in the
    Resource Explorer
    , select the RECORD_IN table and click
    File
    Database Row Test
    .
  19. On the
    Database Row Test
    dialog box, click
    Go
    .
    The
    Database Row Test Output
    window displays the results of the database row test.

0 COMMENTS

We’d like to hear from you!