A note on parameter lists for Endevor user-exits written in COBOL.

book

Article ID: 50077

calendar_today

Updated On:

Products

CA Bind Analyzer for DB2 for z/OS CA Detector CA SQL-Ease for DB2 for z/OS CA Sysview Performance Management Option for DB2 for z/OS CA Database Detector for DB2 for z/OS CA Plan Analyzer for DB2 for z/OS CA Subsystem Analyzer for DB2 for z/OS CA PanAudit Plus CA Easytrieve Report Generator CA PAN/SQL CA Endevor Software Change Manager (SCM) CA Endevor Software Change Manager - Natural Integration (SCM) CA Endevor Software Change Manager - ECLIPSE Plugin (SCM) CA Endevor Software Change Manager - Enterprise Workbench (SCM) CA 2E

Issue/Introduction

Description:

High-level language Endevor user-exits can be linked with the EPC1UEXT stub. This technote describes it's basic function.

Solution:

Non-package Endevor User-Exits, are called with R1 pointing to an address list as described in the diagram on the second page of Chapter 3: Using Exit Control Blocks, in the Exits Guide (Page 44 in V15).

This would then in COBOL translate to the following 'USING' clause in the exit:

PROCEDURE DIVISION USING EXIT-CONTROL-BLOCK
SRC-ENVIRONMENT-BLOCK.

This exit-program will then need to use the ECB-REQUEST-POINTER to address the REQUEST-INFO-BLOCK.

Similarly it will need the SRC-ENV-NEXT-ENV-POINTER to address the TGT-ENVIRONMENT-BLOCK, if it for example, concerns a MOVE in an EXIT02.

To help avoid the need for above addressing logic, one can link a high-level language exit with EPC1UEXT, as provided in the Endevor hlq.CSIQLOAD, and use that as an ENTRY point in the link.

See the topic 'Exits and High-Level Languages' in the Exits manual also.

The function of EPC1UEXT is to set up all relevant exit control blocks in a parameter list, and pass these to the high level language exit.

Given that a COPY EXITBLKS is present in the LINKAGE SECTION, the EPC1UEXT presence will for a COBOl exit then require the following 'USING' clause:

PROCEDURE DIVISION USING
EXIT-CONTROL-BLOCK
REQUEST-INFO-BLOCK
SRC-ENVIRONMENT-BLOCK
SRC-ELEMENT-MASTER-INFO-BLOCK
SRC-FILE-CONTROL-BLOCK
TGT-ENVIRONMENT-BLOCK
TGT-ELEMENT-MASTER-INFO-BLOCK
TGT-FILE-CONTROL-BLOCK.

Above 'USING' is relevant for all the numbered user-exits(except EXIT07's), however whether the content of a particular control block is to be used, depends on the context(exit#), and action for which it is called (see the diagram mentioned above).

For example an exit04 called for an ADD, will have a SRC-FILE-CONTROL-BLOCK passed , but the SRC-ELEMENT-MASTER-INFO-BLOCK will not contain valid data.

Environment

Release:
Component: C21E