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

Calling a User Exit Program by Using the PowerExchange CallProg Function - Example

Calling a User Exit Program by Using the PowerExchange CallProg Function - Example

In this example, you call a user exit program by adding
user-defined
fields to a data map record to invoke the PowerExchange CallProg function.
The user exit program returns the class type for the data in a specified field. The user exit program tests any field with a maximum length of 15 bytes.
The following table describes the class types that the user exit program returns:
Class Type
Description
A
Alphabetic
H
High values
L
Low values
N
Numeric zoned decimal
S
Spaces
This example shows how to complete the following tasks:
  1. Add a data map by using a sample data file and copybook that ship with PowerExchange on
    z/OS
    .
  2. Create and compile a user exit program. Link-edit the program into the PowerExchange Listener LOADLIB library on
    z/OS
    .
  3. Add the following
    user-defined
    fields to the MASTER_REC data map record:
    • The classtype_bin_no, classtype_dec_no, and classtype_rec_type fields.
      Defined as a one-byte CHAR fields. The user exit program that is called by the CallProg function returns the class type of a specified field in these fields. You must define a separate classtype field for each field for which you want to check the class type.
    • The rc_bin_no, rc_decimal_no, and rc_rec_type fields.
      Defined as NUM32 fields. Use these fields to call the CallProg function and to contain the return code from the user exit program call.
    Before PowerExchange completes data checking for a data map record, it runs any expressions and program calls defined in
    user-defined
    fields in the data map record.
  4. Refresh the columns in the MASTER_REC table to pick up the user-defined fields that you added to the MASTER_REC record.
  5. Run a database row test on the data map record to test the results of the user exit program and to verify that the user exit program runs correctly.

0 COMMENTS

We’d like to hear from you!