10.3.2 OTMA Destination Resolution User Exit (DFSYDRU0)
The listing below is the sample IBM OTMA destination resolution user exit. The IBM DFSYDRU0
user exit enables IMS to determine whether the destination is an OTMA client, a non-OTMA LTERM
, a different OTMA client, or an invalid destination. In the following sample, the lines in bold are modifications that you must make to the IBM DFSYDRU0
user exit.
Listing D‑4 OTMA Destination Resolution User Exit (DFSYDRU0
)
TITLE 'DFSYDRU0: OTMA DESTINATION RESOLUTION USER EXIT'
DFSYDRU0 CSECT
DFSYDRU0 AMODE 31
DFSYDRU0 RMODE ANY
********************************************************************
* *
* DESCRIPTION: OTMA DESTINATION RESOLUTION USER EXIT *
* *
***********************************************************@SCPYRT**
* *
* Licensed Materials - Property of IBM *
* *
* "Restricted Materials of IBM" *
* *
* 5655-158 (C) Copyright IBM Corp. 1991,1996 *
* *
***********************************************************@ECPYRT**
* *
* MODULE TYPE: DC *
* *
* PROCESSOR: ASSEMBLER H *
* *
* MODULE SIZE: SEE EXTERNAL SYMBOL DICTIONARY PRODUCED BY *
* ASSEMBLER *
* *
* ATTRIBUTE: REENTRANT *
* *
* ENTRY POINT: DFSYDRU0 *
* *
* ENTRY INTERFACES : *
* *
* STATUS: RELEASE 5.1 CHANGE LEVEL - 0 *
* *
* FUNCTION: THIS MODULE IS CALLED BY IMS WHEN AN APPLICATION *
* CALL (IE CHNG OR ISRT) RESULTS IN A SEARCH FOR *
* A DESTINATION, AND OTMA FIND-DEST PROCESSING *
* IS TO BE PERFORMED (AS DETERMINED BY DFSYPRX0 *
* PROCESSING). *
* DFSYDRU0 DETERMINES IF: *
* 1. DESTINATION IS AN OTMA CLIENT TPIPE *
* 2. DESTINATION IS A NON-OTMA LTERM *
* (LEGACY PROCESSING). *
* 3. DESTINATION IS IN A DIFFERENT OTMA CLIENT *
* 4. DESTINATION IS INVALID *
* *
* DEPENDENCY: IMS/ESA 5.1 *
* *
* MODULE TYPE: PROCEDURE *
* ATTRIBUTE: RE-ENTRANT *
* PROCESSOR: ASSEMBLER H *
* *
* REGISTERS: STANDARD ENTRY AND EXIT *
* *
* MODULE SIZE: SEE ASSEMBLER LISTING *
* *
* LINKAGE: BALR 14,15 *
* *
* *
********************************************************************
EJECT
***********************************************************************
* *
* INTERFACE: *
* *
* CONTENTS OF REGISTERS AT ENTRY: *
* R1 = ADDRESS OF STANDARD IMS USER EXIT PARMLIST *
* *
* STANDARD PARMLIST *
* --------- *
* | | *
* |---------| *
* | | *
* |---------| *
* | | DFSYPRX0 PARMLIST *
* +12 |---------| |---------------| *
* | |---->|INPUT LTERM | +0 *
* --------- |---------------| *
* |DEST NAME | +8 *
* |---------------| *
* |TRAN NAME | +16 *
* |---------------| *
* |FLAGS | +24 *
* |---------------| *
* |USER ID | +28 *
* |---------------| *
* |GROUP | +36 *
* |---------------| *
* |DEST CLIENT | +44 *
* |---------------| *
* |RESERVED | +60 *
* |---------------| *
* |INPUT CLIENT | +64 *
* |---------------| *
* |A(MCI) | +80 *
* |---------------| *
* |A(STATE DATA) | +84 *
* |---------------| *
* |A(USER DATA) | +88 *
* |---------------| *
* |RESERVED | +92 *
* |---------------| *
* |A(MEM OVERRIDE)| +96 *
* |---------------| *
* |FLAGS | +100 *
* |---------------| *
* *
* *
* R13 = SAVE AREA ADDRESS *
* R14 = RETURN ADDRESS *
* R15 = ENTRY POINT ADDRESS *
* *
* *
***********************************************************************
EJECT
***********************************************************************
* *
* CONTENTS OF OTMA PRE-ROUTING USER EXIT PARMLIST: *
* *
* +0 = 8-BYTE NAME OF LTERM/TPIPE WHICH *
* INVOKED THE CURRENT TRANSACTION *
* (LEFT-JUSTIFIED, PADDED WITH BLANKS) *
* THIS IS AN ENTRY PARAMETER ONLY. *
* *
* +8 = 8-BYTE DESTINATION NAME *
* (LEFT-JUSTIFIED, PADDED WITH BLANKS) *
* THIS IS AN ENTRY PARAMETER ONLY. *
* *
* +16 = 8-BYTE TRANSACTION NAME *
* (LEFT-JUSTIFIED, PADDED WITH BLANKS) *
* THIS IS AN ENTRY PARAMETER ONLY. *
* *
* +24 = 1-BYTE FLAG *
* X'80' - IF SET, INDICATES THAT AN INPUT *
* OTMA PREFIX EXISTS. THE MCI, *
* STATE DATA, AND USER DATA ARE *
* ACCESSIBLE IN THIS PARMLIST. *
* X'40' - IF SET, INDICATES THAT A DIFFERENT *
* OTMA CLIENT MAY BE SPECIFIED USING *
* RETURN CODE OF R15=8. (I.E. MEMBER *
* OVERRIDE IS ALLOWED FOR THIS CALL). *
* THIS IS AN ENTRY PARAMETER ONLY. *
* *
* +25 = SYNCRONIZATION LEVEL IF THE INPUT WAS *
* FROM AN OTMA CLIENT. *
* THIS IS AN ENTRY PARAMETER ONLY. *
* *
* +26 = 1-BYTE FLAG *
* X'80' - IF SET, TPIPE EXISTS FOR THE CLIENT *
* X'40' - IF SET, LTERM EXISTS IN IMS (LEGACY) *
* X'20' - IF SET, LU62 DESCRIPTOR EXISTS *
* X'10' - IF SET, ETO IS AVAILABLE *
* X'08' - IF SET, CLIENT IS ACTIVE *
* THIS IS AN ENTRY PARAMETER ONLY. *
* *
* +27 = 1-BYTE RESERVED *
* *
* +28 = 8-BYTE USERID *
* (LEFT-JUSTIFIED, PADDED WITH BLANKS) *
* THIS IS AN ENTRY PARAMETER ONLY. *
* *
* +36 = 8-BYTE GROUP ID *
* (LEFT-JUSTIFIED, PADDED WITH BLANKS) *
* THIS IS AN ENTRY PARAMETER ONLY. *
* *
* +44 = 16-BYTE DESTINATION CLIENT NAME *
* (LEFT-JUSTIFIED, PADDED WITH BLANKS) *
* THIS IS AN ENTRY PARAMETER ONLY. *
* *
* +60 = 4-BYTE RESERVED *
* *
* +64 = 16-BYTE NAME OF INPUT CLIENT MEMBER NAME *
* IF INPUT WAS FROM A CLIENT, BLANKS OTHERWISE. *
* (LEFT-JUSTIFIED, PADDED WITH BLANKS) *
* THIS IS AN ENTRY PARAMETER ONLY. *
* *
* +80 = ADDR(MESSAGE CONTROL INFORMATION), *
* AVAILABLE FROM INPUT OTMA MESSAGE PREFIX. *
* THIS IS AN ENTRY PARAMETER ONLY. *
* *
* +84 = ADDR(STATE DATA), *
* AVAILABLE FROM INPUT OTMA MESSAGE PREFIX. *
* THIS IS AN ENTRY PARAMETER ONLY. *
* *
* +88 = ADDR(USER DATA), *
* AVAILABLE FROM INPUT OTMA MESSAGE PREFIX. *
* *
* THIS AREA IS ALSO USED TO RETURN NEW OR *
* MODIFIED USER DATA, UP TO A MAXIMUM OF *
* 1024 BYTES. @PQ07683
* *
* THE FORMAT OF THE USER DATA IS: *
* 0-1 LENGTH OF FOLLOWING USER DATA, WHICH *
* INCLUDES THIS LENGTH FIELD *
* 2- USER DATA *
* *
* +92 = 4-BYTE RESERVED *
* *
* +96 = ADDR(OUTPUT PARAMETER LIST) *
* THE OUTPUT PARAMETER LIST IS USED TO *
* RETURN INFORMATION TO IMS. SEE UNDER *
* CONTENTS OF REGISTERS AT EXIT. *
* *
* *
* CONTENTS OF REGISTERS AT EXIT: *
* *
* R15 = RETURN CODE *
* *
* RETURN CODE CAN BE ONE OF THE FOLLOWINGS: *
* 0 : DESTINATION IS OTMA CLIENT TPIPE *
* 4 : DESTINATION IS NON-OTMA LTERM (LEGACY) *
* 8 : DESTINATION IS IN A DIFFERENT CLIENT. *
* THE CLIENT NAME MUST BE RETURNED IN *
* THE DFSYDRU0 PARMLIST. *
* 12: DESTINATION IS INVALID *
* *
* CONTENTS OF OTMA PRE-ROUTING USER EXIT PARMLIST: *
* *
* ALL FIELDS IN THE PARMLIST SHOULD REMAIN UNCHANGED. *
* OUTPUT INFORMATION IS RETURNED AS FOLLOWS: *
* *
* +96 = ADDR(OUTPUT PARAMETER LIST) *
* +00 = (16-BYTE MEMBER OVERRIDE) *
* THIS FIELD IS USED WHEN THE DESTINATION *
* IS IN A DIFFERENT OTMA CLIENT. *
* RETURN CODE 8 MUST BE SET. *
* (LEFT JUSTIFIED, PADDED WITH BLANKS) *
* *
* +16 = 1-BYTE OUTPUT FLAG FIELD *
* X'80' = IF SET, INDICATES THAT IF A *
* TPIPE NEEDS TO BE CREATED, IT *
* SHOULD BE A SYNC'D TPIPE. *
* THIS IS ONLY VALID WHEN *
* RETURN CODE = 0. *
* *
* +17 = 15-BYTE RESERVED *
* *
* *
* *
* REGISTER 13 IS THE ADDRESS OF SAVE AREA. *
* *
* NORMAL LINKAGE CONVENTIONS FOR REGISTER 13, 14 AND 15 *
* *
* *
* *
***********************************************************************
* @PQ00242
* @PQ00242
* @PQ00242
* @PQ00242
* @PQ00242
* @PQ00242
SAVE (14,12),,DFSYDRU0&SYSDATE&SYSTIME @PQ00242
SPACE 2 @PQ00242
LR R12,R15 MODULE ADDRESSABILITY @PQ00242
USING DFSYDRU0,R12 @PQ00242
* @PQ00242
*
L R2,12(,R1)
CLC 44(16,R2),MYCLIENT
BNE EXIT4
*
EXIT0 DS 0H
LA R15,0 RC = 0
B EXIT
*
EXIT4 DS 0H
LA R15,4
EXIT DS 0H
RETURN (14,12),,RC=(15) RETURN WITH RETURN CODE IN R15
SPACE 2
REQUATE
*
MYCLIENT DC CL16'BEAOTMA01' TEST CLIENT
*
END