Terminal-not-known sample exit program: DFHXTENF

DFHXTENF is a sample global user exit program that handles terminal-not-known conditions that arise from START and ATI requests. It is designed to be invoked at the XALTENF or XICTENF exit.

About DFHXTENF

DFHXTENF is a sample program that can be used for the XALTENF and XICTENF exits. Based on DFHXTENF, you can create your own global user exit program that can be used for both exits, or create a separate program for each exit.

Figure 1 shows the executable code from the supplied sample program DFHXTENF. DFHXTENF rejects transient data requests, because the action in this case is very much installation-dependent.

Figure 1. Sample program for XALTENF and XICTENF exits
DFHXTENF CSECT
         DFHVM XTENF
         ENTRY DFHXTENA
DFHXTENA DS    0H
         STM   R14,R12,12(R13)     save registers
         BALR  R11,0               set up base register
         USING *,R11
*
         USING DFHUEPAR,R1         DFHUEH parameter list
*
*        Could check the terminal ID at this point. In this
*        program we assume it is valid. We also choose to accept
*        START requests and reject Transient Data trigger level
*        events.
*
         L     R2,UEPICEVT         access type of request
         CLC   0(2,R2),START       START command?
         BE    STARTCMD            yes
*
         CLC   0(2,R2),STARTDAT    START command with data?
         BNE   NOTSTART            no, must be Transient Data
*
STARTCMD DS    0H
*
*        Accept the default netname if we are Function Shipping.
*        Otherwise build a netname.
*
         L     R2,UEPICFS          access FS information
         CLI   0(R2),UEPICFY       Function Shipping?
         BNE   BLDNETNM            no, build a netname
*
         LH    R15,NETNAME         accept the default netname
         B     EXIT
 
*BLDNETNM DS    0H
*
*        Build a netname by taking the first character of the
*        terminal ID and appending it to the characters 'CICS'.
*
         L     R2,UEPICNTO         access the output netname field
         L     R3,UEPICRTR         access ID of requested terminal
         MVC   0(8,R2),=C'CICS    '
         MVC   4(1,R2),0(R3)       first character of terminal ID
         LH    R15,NETNAME         netname returned
         B     EXIT
*
NOTSTART DS    0H
         LH    R15,UNKNOWN         reject Transient Data trigger       *
                                   level events
*
EXIT     DS    0H
         L     R14,12(R13)         restore registers except 15
         LM    R0,R12,20(R13)      which contains the return code
         BR    R14
*
***********************************************************************
*        Local constants
***********************************************************************
START    DC    AL2(UEPICES)
STARTDAT DC    AL2(UEPICESD)
NETNAME  DC    AL2(UERCNETN)
UNKNOWN  DC    AL2(UERCTEUN)
*
         DFHEND DFHXTENF
Important: The example in Figure 1 is intended purely as a demonstration of some of the possibilities available, and would be impractical in a production environment.