IBM SC34-6814-04 Server User Manual


 
TITLE ’GUEXPI - GLOBAL USER EXIT PROGRAM WITH XPI’
*************************************************************************
* The first three instructions set up the global user exit *
* environment, identify the user exit point, prepare for the use of *
* the exit programming interface, and copy in the definitions that *
* are to be used by the XPI function. *
*************************************************************************
*
DFHUEXIT TYPE=EP,ID=XFCREQ PROVIDE DFHUEPAR PARAMETER
* LIST FOR XFCREQ IN THE FILE
* CONTROL PROGRAM AND LIST
* OF EXITID EQUATES
*
DFHUEXIT TYPE=XPIENV SET UP ENVIRONMENT FOR
* EXIT PROGRAMMING INTERFACE --
* MUST BE ISSUED BEFORE ANY
* XPI MACROS ARE ISSUED
*
COPY DFHSMMCY DEFINE PARAMETER LIST FOR
* USE BY DFHSMMCX MACRO
*
*************************************************************************
* The following DSECT maps a storage area you can use to make the *
* exit program reentrant by storing the address of the storage you *
* acquire in the first four bytes of the 260-byte area provided by *
* the user exit handler (DFHUEH) and addressed by UEPXSTOR. *
*************************************************************************
*
TRANSTOR DSECT DSECT FOR STORAGE OBTAINED BY
* GETMAIN
.
.
.
storage declarations
.
.
.
*
*************************************************************************
* The next seven instructions form the normal start of a global user *
* exit program, setting the program addressing mode to 31-bit, saving *
* the calling program’s registers, establishing base addressing, and *
* establishing the addressing of the user exit parameter list. *
*************************************************************************
*
GXPI CSECT
GXPI AMODE 31 SET TO 31-BIT ADDRESSING
*
SAVE (14,12) SAVE CALLING PROGRAM’S REGISTERS
*
LR R11,R15 SET UP USER EXIT PROGRAM’S
USING GXPI,R11 BASE REGISTER
*
LR R2,R1 SET UP ADDRESSING FOR USER
USING DFHUEPAR,R2 EXIT PARAMETER LIST -- USE
* REGISTER 2 AS XPI CALLS USE
* REGISTER 1
*
Figure 12. Global user exit program with XPI (part 1)
Chapter 3. The user exit programming interface (XPI) 315