Information
Space announcement This documentation space provides the same content as before, but the organization of the content has changed. The content is now organized based on logical branches instead of legacy book titles. We hope that the new structure will help you quickly find the content that you need.

Configuring Automatic Session Termination


This section explains how to configure Code Debug’s automatic session termination. This feature is also available to transaction routing users.


This task requires the Code Debug CICSinstaller.

Overview

Normally, an Code Debug CICS user will terminate their session before leaving CICS. But if a terminal is disconnected, signed off, or logged off while an Code Debug session is still active, the ID of that terminal will remain assigned to the abandoned (but still active) session. Because another terminal logging on could be assigned the same ID, it is possible for a user to be assigned an active Code Debug session that they are not aware of. The first user may have left the session with program breakpoints set and no sure way of re-accessing the same session to release them.

Code Debug CICS can be set up to automatically terminate an active debugging session when the terminal is signed off, logged off, and/or disconnected.

XSNOFF provides session termination when an EXEC CICS SIGNOFF command is issued. Terminal autoinstall sites can modify their autoinstall exit to terminate any active Code Debug sessions when a user logs off from CICS.

XSNOFF and the terminal autoinstall exit each accomplish automatic session termination by invoking the Code Debug transaction XPN0. This transaction starts program DBUGEND0, which deals with session termination in transaction routing environments. DBUGEND0 then starts program DBUGEND, which terminates any active Code Debug CICS sessions assigned to that terminal’s ID.

Code Debug’s automatic session termination writes messages to transient data destination CSMT when any of the following occur:

  • A session is successfully terminated.
  • A session is not terminated because the TERMINATE_SESSION_AT_DISCONNECT parameter has been set to NO.
  • DBUGEND encounters an error while performing command-level RETRIEVE or GETMAIN commands.

Tasks

To install Code Debug’s automatic session termination feature, follow the instructions given as follows.

Task 2.1 Enable Automatic Session Termination

Code Debug CICS automatic session termination can be established in either or both of the following ways:

  • By enabling the signoff exit, XSNOFF. This exit is entered after a terminal user signs off from CICS. XSNOFF will terminate any active Code Debug debugging sessions assigned to that terminal.

    Warning

    Important

    There are certain disadvantages to using the XSNOFF exit:

    • The XSNOFF exit prevents you from using Code Debug to debug programs that contain EXEC CICS SIGNOFF commands.
    • XSNOFF does not terminate debugging sessions when a terminal is disconnected.
  • For sites using terminal autoinstall, by modifying the exit DFHZATDX (or whatever terminal autoinstall exit is being used). When a terminal is logged off, the modified exit will terminate any active Code Debug debugging sessions assigned to that terminal.
  1. To use either or both methods of automatic session termination, first do the following:
    1. Check the values of the following global parameters:
      • TRANSID_XPN0 - This is the transaction ID invoked at session termination. The default is XPN0. If a different value is used, that value instead of XPN0 must be defined to CICS as part of step b.
      • TERMINATE_SESSION_AT_DISCONNECT - This parameter must be set to YES for Code Debug to terminate active debugging sessions when a terminal is disconnected or logged off. The default is YES.
    2. Ensure that the following resources have been defined to CICS (during the installation configuration in the applicable “Update the CICS Resource Definitions” task in the Code Debug CICS Installation and Configuration space:
      • Program DBUGEND0.
      • Program DBUGEND.
      • Program DBUGEND1. (Optional. See Configure For Transaction Routing Users)
      • Transaction XPN0 (or whatever transaction is specified for the TRANSID_XPN0 global parameter.
      • Transaction XPND.
  2. Ensure that programs DBUGEND and DBUGEND0 are link edited into the CPWR.cMXD170.SMXDOccL library.
  3. To enable the XSNOFF exit for automatic session termination at terminal signoff, change the value of the ENABLE_GLOBAL_USER_SIGN_OFF_EXIT global parameter to YES. The default is NO. See Standard Global Table DBUGGBL.

    Warning

    Important

    When the XSNOFF exit starts transaction XPN0, CICS assigns to it the userID that is defined in the DFLTUSER system initialization parameter. If you enable the XSNOFF exit and want to secure the XPN0 transaction through your external security manager, you must allow the DFLTUSER userID to have access to transaction XPN0 and program DBUGEND0.

  4. If your site uses transaction routing, see Configure For Transaction Routing Users.
  5. Sites using terminal autoinstall that want automatic session termination when terminals are logged off should perform the following:

    1. Ensure that dynamic transaction backout is enabled in the region.

      Error
      Warning

      If dynamic transaction backout is not enabled, transaction CATD may experience an ASPE abend when the terminal is disconnected. If this occurs, failure of terminal control initialization will prevent CICS from being warm started.

    2. Modify the terminal autoinstall exit DFHZATDX (or whatever exit is used at your site) as follows:

      Warning

      Important

      If your site uses a different autoinstall exit, its name can be found in the SIT parameter AIEXIT.

        

    • Add the following line of code to DFHZATDX in the “Delete Processing Section” after the IBM Put Delete Code Here comment
EXEC CICS START INTERVAL (0) TRANSID (’XPN0’) FROM (DELETE_TERM_ID)
Warning

Important

  • Add the above line in the section labeled DELETE_TERMINAL. Do not add the line to the section labeled DELETE_SHIPPED_TERMINAL.
  • Consider adding “NOHANDLE”—or other appropriate condition handling—for exception conditions such as TRANSIDERR.
  • Reassemble and link edit DFHZATDX (or whatever VTAM terminal autoinstall exit is used at your site).

Task 2.2 Configure For Transaction Routing Users

Table DBUGEND1 is a CSECT with DC statements defining all the transactions to start when terminating Code Debug sessions in a static transaction routing environment. The table should contain all the transaction IDs on the local system (TOR) corresponding to the remote transaction XPND. If table DBUGEND1 is not present or does not contain any transaction IDs, transaction XPND is run in the local system when a terminal is logged off or signed off.

Transaction routing users with any release of CICS should perform the following procedure:

  1. Assemble and link edit a table named DBUGEND1 (see the following figure) in the Code Debug load library.

    Warning

    Important

    The DBUGEND1 table must not be linked with command level stubs.

    DBUGEND1 Table

    image2021-10-8_12-11-2.png

    1Add the last entry shown only if you will be doing debugging in a TOR and require automatic session termination there.

    Warning

    Important

    Changes or new definitions are not required on the remote CICS regions (AOR) if you have not changed the default 

    Code Debug CICS

     transaction names.

  2. Add the following transaction resource definitions for the local CICS region (TOR):

    CEDA DEFINE TRANSACTION(XPN1) GROUP(XPEDR170)
    REMOTESYSTEM(CIC1) REMOTENAME(XPND) DYNAMIC(NO)
    CEDA DEFINE TRANSACTION(XPN2) GROUP(XPEDR170)
    REMOTESYSTEM(CIC2) REMOTENAME(XPND) DYNAMIC(NO)
    CEDA DEFINE TRANSACTION(XPN3) GROUP(XPEDR170)
    REMOTESYSTEM(CIC3) REMOTENAME(XPND) DYNAMIC(NO)
    .
    .
    .
    CEDA DEFINE PROGRAM(DBUGEND1) GROUP(XPEDR170)
    LANGUAGE(ASM) EXECKEY(CICS)

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI DevX Code Debug for CICS 17.02