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

PL/I Program Linkage - Example

PL/I Program Linkage - Example

The following code shows an example of PL/I program linkage:
PROC(NUMBER_ARGUMENTS, FAILURE_CODE, MESSAGE_BUFFER_PTR, MESSAGE_BUFFER_LENGTH, TEXT_AREA_PTR, TEXT_AREA_LENGTH, NUMBER1, NUMBER1_LENGTH) OPTIONS(FETCHABLE) REORDER; /*---------------------*/ /* LINKAGE FROM CALLER */ /*---------------------*/ DCL NUMBER_ARGUMENTS FIXED BIN(31); DCL FAILURE_CODE FIXED BIN(31); DCL MESSAGE_BUFFER_PTR PTR; DCL 1 MESSAGE_BUFFER_STR BASED(ADDR(MESSAGE_BUFFER_PTR)), 4 MESSAGE_BUFFER CHAR(255); DCL MESSAGE_BUFFER_LENGTH FIXED BIN(31); DCL TEXT_AREA_PTR PTR; DCL 1 TEXT_AREA_STR BASED(ADDR(TEXT_AREA_PTR)), 4 TEXT_AREA CHAR(15); DCL TEXT_AREA_LENGTH FIXED BIN(31); DCL NUMBER1 FIXED BIN(31); DCL NUMBER1_LENGTH FIXED BIN(31);
In the example program, two fields are passed to the program.
  • The first field is called TEXT and has a maximum size of 15 bytes. Data can be moved from and to it using PL/I field TEXT-AREA. If it is not a fixed-length field, then the TEXT-AREA-LENGTH must be used to determine the actual length. If the program wants the length to change, it must store the required value in field TEXT-AREA-LENGTH.
  • The second field is numeric, which in the Navigator is defined as NUM32. Data can be moved from and to it using field NUMBER1. It would be unusual to want to make use of field NUMBER1-LENGTH.
    If the field is not nullable, the field contains a value of 4 on entry to the PL/I program.
    If the NUMBER1-LENGTH field is NULL, it is set to 0. This situation might occur if the field was NULL before the program was called. If the program sets the field NULL, it also set NUMBER1-LENGTH to 0.

0 COMMENTS

We’d like to hear from you!