|  | BEA eLink TCP for IMS 3.1 Information Center
HOME | SEARCH | CONTACT | PDF FILES | WHAT'S NEW
| TABLE OF CONTENTS | PREVIOUS TOPIC | NEXT TOPIC | GLOSSARY | INDEX

# Sample JCL and User Exits

Use the following sample JCL and user exits to run the BEA eLink for Mainframe TCP for IMS (hereafter referenced as eLink TCP for IMS) product:

- JCL for eLink TCP for IMS

- Executing BEA eLink TCP for IMS as a BMP

- Executing eLink TCP for IMS as OTMA

- Sample User Exits Enabling IMS Clients to Communicate to Remote Services

  - OTMA Prerouting User Exit (DFSYPRX0)

  - OTMA Destination Resolution User Exit (DFSYDRU0)

  ## JCL for eLink TCP for IMS

  The JCL distribution library contains sample JCL for executing the eLink TCP for IMS product. You must modify the sample JCL to conform to the conventions and standards for your installation. Modifications include the following:

  - Adding an appropriate job card

  - Changing the names of IBM product datasets (IMS, TCP/IP for OS/390, and LE/370) to match those used by your installation

  - Changing the names of eLink TCP for IMS datasets to match those used by your installation

  - Changing the names of certain program modules (for example, the linkage editor), if necessary, to match those used by your installation

  ### Executing BEA eLink TCP for IMS as a BMP

  The JCL used to execute the eLink TCP for IMS BMP is the standard JCL supplied with IMS for executing BMPs. You should use the JCL supplied with your version of IMS. Listing D-1 is sample JCL for reference for modifying the standard BMP JCL for use with eLink TCP for IMS.

  > Listing D-1 Sample JCL for Executing eLink TCP for IMS BMP

  >     //JOBNAME  JOB    ETC.
  >     //IMSBATCH  PROC  AGN=,      RACF APPL GROUP NAME
  >     //          CKPTID=NOMSG681, CHKPT ID FOR RESTART
  >     //          CPUTIME=0,       BMP TASK TIME OPTION
  >     //          DIRCA=000,       REGION AREA SIZE
  >     //          IMSID=IVP4,      DSN HLQ IMS CONTROL REGION ID
  >     //          IN=,             INPUT TRAN NAME
  >     //          MBR=,            APPL LOAD MODULE
  >     //          NBA=,            FAST PATH BUFFERS
  >     //          OBA=,            FAST PATH PAGEFIX BUF
  >     //          OPT=N,           NO CNTL PGM: N/W/C
  >     //          OUT=,            OUTPUT TRAN/LTERM
  >     //          PARDLI=0,        PARALLEL DLI OPTION
  >     //          PGMLIB=,         STEPLIB LOAD LIBRARY
  >     //          PRLD=,           SUFFIX FOR DFSMPL__
  >     //          PSB=,            BATCH PSB NAME
  >     //          REG=2048K,       JOBSTEP REGION PARAMETER
  >     //          SPIE=0,          USER SPIE OPTION 0/1
  >     //          SSM=,            DB2 SUBSYSTEM MEMBER ID ++
  >     //          STIMER=0,        TIMER OPTION 0/1
  >     //          TEST=0           VALIDITY CHK ADDR 0/1
  >     //          EXEC  PGM=DFSRRC00,REGION=&REG,
  >     //          PARM=(BMP,&MBR,&PSB,&IN,&OUT,
  >     //          &OPT&SPIE&TEST&DIRCA,&PRLD,&STIMER,&CKPTID,
  >     //          &PARDLI,&CPUTIME,&NBA,&OBA,&IMSID,&AGN,&SSM)
  >     //STEPLIB      DD    DSNAME=&PGMLIB,DISP=SHR
  >     //             DD    DSNAME=&DSID..RESLIB,DISP=SHR
  >     //             DD    DISP=SHR,DSN=SYS1.SCEELKED
  >     //             DD    DISP=SHR,DSN=SYS1.SCEERUN
  >     //SYSOUT       DD    SYSOUT=*
  >     //SYSPRINT     DD    SYSOUT=*
  >     //SYSUDUMP     DD    SYSOUT=*
  >     //CEEDUMP      DD    SYSOUT=*
  >     //DFSESL       DD    DSNAME=&DSID..RESLIB,DISP=SHR
  >     //DFSRESLB     DD    DSNAME=&DSID..RESLIB,DISP=SHR
  >     //IMS          DD    DSNAME=&DSID..PSBLIB,DISP=SHR
  >     //             DD    DSNAME=&DSID..DBDLIB,DISP=SHR
  >     //PROCLIB      DD    DSNAME=&DSID..PROCLIB,DISP=SHR
  >     //SYSTCPD      DD    DISP=SHR,DSN=TCPIP.V3R1.DATA
  >     //MSGLOG       DD    DISP=SHR,DSN=BEATCPI.DIST.MSGLOG
  >     //MSGCAT       DD    DISP=SHR,DSN=BEATCPI.DIST.MSGCAT
  >     //SVRLOG       DD    DISP=SHR,DSN=BEATCPI.DIST.SVRLOG
  >     //CONFIG       DD    DISP=SHR,DSN=BEATCPI.DIST.CONFIG(BEATCPI)
  >     //          PEND
  >     //*
  >     //          EXEC  PROC=IMSBATCH,
  >     //          PGMLIB='BEATCPI.DIST.LOAD',   BEATCPI LOAD LIBRARY
  >     //          MBR=BEATCPI,                       BEATCPI LOAD MODULE NAME
  >     //          IN=BEATCPI,                   BEATCPI TRANSACTION CODE
  >     //          PSB=BEATCPI,                  BEATCPI PSB NAME
  >     //          OPT=C,
  >     //          DSID=IMSV5R1,
  >     //          AGN=IVP
  >     //DFSCTL    DD    *
  >     SBPARM ACTIV=NO
  >     /*
  >     //

  #### Notes

  1. `CKPTID=NOMSG681` is coded to suppress message DFS681I, which is normally issued by IMS each time a `CHKP` call is issued.

  2. The appropriate DD statements for the LE/370 runtime environment (`SCEELKED` and `SCEERUN`) must be added to the `STEPLIB`.

  3. Add a `SYSUDUMP DD` statement to obtain an OS/390 dump for certain abend conditions.

  4. Add a `CEEDUMP DD` statement to obtain a formatted LE/370 dump for certain exception conditions.

  5. Add a `SYSTCPD DD` statement to enable TCP/IP for OS/390 to locate datasets in the runtime environment. Refer to the IBM documentation for TCP/IP for OS/390 for additional information.

  6. Add DD statements for the eLink TCP for IMS datasets (`CONFIG`, `MSGLOG`, and `SVRLOG`).

  ### Executing eLink TCP for IMS as OTMA

  Listing D-2 is sample JCL for executing as an OTMA client. Use the following JCL only as a reference for modifying the standard BMP JCL for use with the eLink TCP for IMS product.

  > Listing D-2 Sample Run JCL

  >     //JOBNAME  JOB    ETC.
  >     //***************************************************************
  >     //*  BRING UP BEA CONNECT TCP FOR IMS/OTMA                      *
  >     //***************************************************************
  >     //STEP1    EXEC PGM=BEATCP34,REGION=0M,TIME=1440
  >     //STEPLIB  DD   DSN=hlq1.hlq2,DISP=SHR
  >     //* Place the name of the authorized library in the STEPLIB DD above
  >     //SYSTCPD  DD   DISP=SHR,DSN=TCPIP.DATA
  >     //MSGLOG   DD   DISP=SHR,DSN=BEATCPI.MSGLOG
  >     //MSGCAT   DD   DISP=SHR,DSN=BEATCPI.MSGCAT
  >     //SVRLOG   DD   DISP=SHR,DSN=BEATCPI.SVRLOG
  >     //CONFIG   DD   DISP=SHR,DSN=hlq1.hlq2.JCL(CONFIG)
  >     //* Place the name of the Config file in the CONFIG DD above
  >     //SYSPRINT DD   SYSOUT=*
  >     //SYSUDUMP DD   SYSOUT=*

  ## Sample User Exits Enabling IMS Clients to Communicate to Remote Services

  To enable IMS clients to communicate to remote services through OTMA, you must install both the DFSYPRX0 and DFSYDRU0 IBM user exits available in IMS. Customize the exits to recognize specific transactions as well as the eLink OTMA client name as defined in the configuration file. For more information about setting up the configuration file, refer to "Configuring BEA eLink TCP for IMS." Refer to the IBM document Open Transaction Manager Access Guide for additional information on the IBM user exits.

  ### OTMA Prerouting User Exit (DFSYPRX0)

  Listing D-3 is the sample IBM OTMA prerouting user exit. The IBM DFSYPRX0 user exit enables IMS to search for a destination for an application request. In the following sample, the lines in bold are modifications that you must make to the IBM DFSYPRX0 user exit.

  > Listing D-3 OTMA Pre-routing Sample User Exit (DFSYPRX0)

  >     TITLE 'DFSYPRX0: OTMA PRE-ROUTING USER EXIT'
  >     DFSYPRX0 CSECT
  >     DFSYPRX0 AMODE 31
  >     DFSYPRX0 RMODE ANY
  >     ********************************************************************
  >     *                                                                  *
  >     * DESCRIPTION: OTMA PRE-ROUTING 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: DFSYPRX0                                          *
  >     *                                                                  *
  >     *   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.                                      *
  >     *              DFSYPRX0 DETERMINES IF:                             *
  >     *                1. IMS SHOULD SEARCH FOR THE DESTINATION          *
  >     *                   WITHOUT LOOKING AT ANY OTMA DESTINATIONS       *
  >     *                   (LEGACY PROCESSING).                           *
  >     *                2. IMS SHOULD INCLUDE OTMA DESTINATIONS,          *
  >     *                   AND PROVIDE A DESTINATION CLIENT MEMBER        *
  >     *                   NAME IF NECESSARY.                             *
  >     *                                                                  *
  >     * 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           *
  >     *                                     |---------------|               *
  >     *                                     |RESERVED       | +44           *
  >     *                                     |---------------|               *
  >     *                                     |CLIENT MEM NAME| +48           *
  >     *                                     |---------------|               *
  >     *                                     |A(MCI)         | +64           *
  >     *                                     |---------------|               *
  >     *                                     |A(STATE DATA)  | +68           *
  >     *                                     |---------------|               *
  >     *                                     |A(USER DATA)   | +72           *
  >     *                                     |---------------|               *
  >     *                                     |RESERVED       | +76           *
  >     *                                     |---------------|               *
  >     *                                     |A(MEM OVERRIDE)| +80           *
  >     *                                     |---------------|               *
  >     *                                                                     *
  >     *                                                                     *
  >     *              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.          *
  >     *                       THIS IS AN ENTRY PARAMETER ONLY.              *
  >     *                                                                     *
  >     *              +25    = SYNCRONIZATION LEVEL IF THE INPUT WAS         *
  >     *                       FROM AN OTMA CLIENT.                          *
  >     *                                                                     *
  >     *              +26    = 2-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    = 4-BYTE RESERVED                               *
  >     *                                                                     *
  >     *              +48    = 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.              *
  >     *                                                                     *
  >     *              +64    = ADDR(MESSAGE CONTROL INFORMATION),            *
  >     *                       AVAILABLE FROM INPUT OTMA MESSAGE PREFIX.     *
  >     *                       THIS IS AN ENTRY PARAMETER ONLY.              *
  >     *                                                                     *
  >     *              +68    = ADDR(STATE DATA),                             *
  >     *                       AVAILABLE FROM INPUT OTMA MESSAGE PREFIX.     *
  >     *                       THIS IS AN ENTRY PARAMETER ONLY.              *
  >     *                                                                     *
  >     *              +72    = ADDR(USER DATA),                              *
  >     *                       AVAILABLE FROM INPUT OTMA MESSAGE PREFIX.     *
  >     *                       THIS IS AN ENTRY PARAMETER ONLY.              *
  >     *                                                                     *
  >     *              +76    = 4-BYTE RESERVED                               *

  >     *                                                                     *
  >     *              +80    = ADDR(16-BYTE MEMBER OVERRIDE)                 *
  >     *                       THIS FIELD IS USED WHEN THE TRANSACTION IS    *
  >     *                       INVOKED FROM A NON-OTMA LTERM, TO INDICATE    *
  >     *                       THE CLIENT NAME WHEN AN OTMA DESTINATION      *
  >     *                       IS DESIRED.                                   *
  >     *                       (LEFT JUSTIFIED, PADDED WITH BLANKS)          *
  >     *                       THIS IS AN EXIT PARAMETER ONLY.               *
  >     *                                                                     *
  >     *                                                                     *
  >     *       CONTENTS OF REGISTERS AT EXIT:                                *
  >     *                                                                     *
  >     *              R15    = RETURN CODE                                   *
  >     *                                                                     *
  >     *                       RETURN CODE CAN BE ONE OF THE FOLLOWINGS:     *
  >     *                       0 : CONTINUE DEFAULT PROCESSING:              *
  >     *                           IF THE TRANSACTION WAS INVOKED FROM AN    *
  >     *                             OTMA TPIPE, THEN OTMA FIND-DESTINATION  *
  >     *                             PROCESSING SHOULD OCCUR.                *
  >     *                           IF THE TRANSACTION WAS INVOKED FROM A NON-*
  >     *                             OTMA LTERM, THEN LEGACY FIND-DESTINATION*
  >     *                             PROCESSING SHOULD OCCUR.                *
  >     *                       4 : OTMA FIND-DESTINATION PROCESSING SHOULD   *
  >     *                           OCCUR.  IF THE TRANSACTION WAS ENTERED    *
  >     *                           FROM A NON-OTMA LTERM, THEN A CLIENT      *
  >     *                           MEMBER NAME MUST BE PROVIDED IN THE       *
  >     *                           PRE-ROUTING PARAMETER LIST.               *
  >     *                       8 : LEGACY FIND-DESTINATION PROCESSING        *
  >     *                           SHOULD OCCUR.                             *
  >     *                                                                     *
  >     *                                                                     *
  >     *                                                                     *
  >     *   REGISTER 13 IS THE ADDRESS OF SAVE AREA.                          *
  >     *                                                                     *
  >     *   NORMAL LINKAGE CONVENTIONS FOR REGISTER 13, 14 AND 15             *
  >     *                                                                     *
  >     *                                                                     *
  >     *                                                                     *
  >     ***********************************************************************
  >     *
  >     *
  >              SAVE  (14,12),,DFSYPRX0&SYSDATE&SYSTIME
  >              SPACE 2
  >              LR    R12,R15             MODULE ADDRESSABILITY
  >              USING DFSYPRX0,R12
  >              USING OTMAPARM,R10
  >              USING SXPL,R9
  >     *
  >              LR    R9,R1               LOAD PARAMETER BASE
  >              L     R10,SXPLFSPL        OTMA SPECIFIC PARAMETERS
  >              CLC   OTMDEST,MYPIPE      SPECIAL DESTINATION?
  >              BNE   PRX01500            B NO
  >              ICM   R8,15,OTMCOVRD      GET ADDRESS OF OVERRIDING NAME
  >              BZ    PRX01550            B IF NO ADDRESS
  >              MVC   0(16,R8),MYCLIENT   SET OVERRIDING CLIENT NAME
  >              LA    R15,4               ROUTE TO OTMA
  >              B     PRX01600            RETURN
  >     *
  >     PRX01500 DS    0H
  >              CLC   OTMTRANS,MYTRAN     SPECIAL TRANSACTION?
  >              BNE   PRX01550            B NO
  >              LA    R15,8               INVOKE LEGACY PROCESSING
  >              B     PRX01600            RETURN
  >     *
  >     PRX01550 DS    0H
  >              LA    R15,0               RC = 0
  >     PRX01600 DS    0H
  >     *
  >              RETURN (14,12),,RC=(15)   RETURN WITH RETURN CODE IN R15
  >              SPACE 2
  >              REQUATE
  >              SPACE 2
  >     MYPIPE   DC    CL8'BEAOPIPE'       TEST TPIPE
  >     MYTRAN   DC    CL8'BEACRP01'       TEST TRANSACTION
  >     MYCLIENT DC    CL16'BEAOTMA01'     TEST CLIENT
  >     *
  >     * DATA MACROS
  >     *
  >              DFSSXPL
  >              BEAOTM
  >     *
  >              END

  #### Sample DSECT BEAOTM

  Listing D-4 is the DSECT BEAOTM macro referenced previously. A DSECT for the OTMA parameter area passed to the DFSYPRX0 exit is not provided by IBM.

  > Listing D-4 DSECT BEAOTM

  >     MACRO
  >              BEAOTM
  >     OTMAPARM DSECT                   OTMA SPECIFIC PARAMETER LIST
  >     OTMLTERM DS    CL8               ORIGINATING LTERM/TPIPE
  >     OTMDEST  DS    CL8               DESTINATION NAME
  >     OTMTRANS DS    CL8               TRANSACTION NAME
  >     OTMFLAGS DS    X                 OTMA FLAGS
  >     #OTMINP  EQU   X'80'             INPUT OTMA MSG PREFIX EXISTS
  >     OTMSYNCH DS    X                 OTMA SYNCHRONIZATION LEVEL
  >     OTMRESVD DS    XL2               RESERVED
  >     OTMUSER  DS    CL8               USER ID
  >     OTMGROUP DS    CL8               GROUP NAME
  >     OTMRESV2 DS    XL4               RESERVED
  >     OTMCNAME DS    CL16              ORIGINATING CLIENT NAME
  >     OTMMSGCL DS    A                 ADDRESS OF INPUT MESSAGE CTL
  >     OTMSTATE DS    A                 ADDRESS OF INPUT STATE DATA
  >     OTMUSERD DS    A                 ADDRESS OF INPUT USER DATA
  >     OTMRSVD3 DS    XL4               RESERVED
  >     OTMCOVRD DS    A                   ADDRESS OF OVERRIDING CLIENT NAME
  >     *
  >              MEND

  ### OTMA Destination Resolution User Exit (DFSYDRU0)

  Listing D-5 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-5 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

  TABLE OF CONTENTS | PREVIOUS TOPIC | NEXT TOPIC | GLOSSARY | INDEX