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

COBOL Program Linkage - Example

COBOL Program Linkage - Example

The following code shows example COBOL program linkage:
003700 LINKAGE SECTION. 003800 003900 01 NUMBER-FIELDS PIC S9(9) COMP. 003901 003902 01 FAILURE-CODE PIC S9(9) COMP. 003903 003904 01 MESSAGE-BUFFER. 003905 05 MESSAGE-BUFFER-BYTE PIC X(1) 003906 OCCURS 1 TO 128 003907 DEPENDING ON MESSAGE-BUFFER-LENGTH. 003908 01 MESSAGE-BUFFER-LENGTH PIC S9(9) COMP. 003910 004000 01 TEXT-AREA. 004010 05 TEXT-AREA-BYTE PIC X(1) OCCURS 15. 004100 01 TEXT-AREA-LENGTH PIC S9(9) COMP. 004111 004120 01 NUMBER1 PIC S9(9) COMP. 004130 01 NUMBER1-LENGTH PIC S9(9) COMP. 005730 005800 PROCEDURE DIVISION USING 005801 NUMBER-FIELDS 005802 FAILURE-CODE 005803 MESSAGE-BUFFER 005807 MESSAGE-BUFFER-LENGTH 005809 TEXT-AREA 005810 TEXT-AREA-LENGTH 005811 NUMBER1 005820 NUMBER1-LENGTH
In the example program UPEC, two fields are passed to the COBOL program.
  • The first field is TEXT, and is a maximum size of 15 bytes. Data can be moved from and to it using COBOL field TEXT-AREA. If it is not a fixed-length CHAR field, then the TEXT-AREA-LENGTH must be used to determine the actual length. If the COBOL 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 PowerExchange Navigator is defined as NUM32. Data can be moved from and to it using COBOL field NUMBER1. Generally, this field is not used.
    If the field is not nullable, the field contains a value of 4 on entry to the COBOL program. If NUMBER1-LENGTH is NULL, it is set to zero. This situation might occur if the field was NULL before the program was called. If NUMBER1-LENGTH is set to NULL, the program sets the NUMBER1-LENGTH field to 0.

0 COMMENTS

We’d like to hear from you!