Topic
10 replies Latest Post - ‏2013-03-14T10:10:55Z by SystemAdmin
SystemAdmin
SystemAdmin
124 Posts
ACCEPTED ANSWER

Pinned topic DFHXCURM exit routine

‏2012-12-14T11:16:28Z |
Hi all,

Is there anybody who can share experience about writing DFHXCURM exit routine ?
I need to manage an external table which contains the name of the cics servers and their availability. The EXCI requests come from several CTG and are redirected to CICS servers depending on the contents of the external table. This external table is updated by batch program or REXX procedures.

Thank you for your answer ?
Updated on 2013-03-14T10:10:55Z at 2013-03-14T10:10:55Z by SystemAdmin
  • JohnTilling
    JohnTilling
    7 Posts
    ACCEPTED ANSWER

    Re: DFHXCURM exit routine

    ‏2012-12-14T12:17:32Z  in response to SystemAdmin
    Hi,

    CICS provides a sample DFHXCURM in the SDFHSAMP library showing how to have a table of available CICS regions.

    Regards,
    John Tilling
    • SystemAdmin
      SystemAdmin
      124 Posts
      ACCEPTED ANSWER

      Re: DFHXCURM exit routine

      ‏2012-12-17T17:20:32Z  in response to JohnTilling
      you're right but in the sample this is an internal table only known by EXCI.

      Regards
      • SystemAdmin
        SystemAdmin
        124 Posts
        ACCEPTED ANSWER

        Re: DFHXCURM exit routine

        ‏2012-12-19T13:53:17Z  in response to SystemAdmin
        Hi

        I think you are wanting a dynamic table - is this correct?

        The provided sample has a hard coded table of CICS regions at the end of DFHXCURM (CICS_TAB )but how about loading the table from a PDS or sequential file the first time the URM is called? Once it is loaded a flag should be set to prevent subsequent invocations from reloading the table.
        This will give you the ability of having different input data for sets of regions or to make changes to the region table without having to have many copies of DFHXCURM or the need to recompile every time a change is needed.

        Never tried this but with my application programming hat on it sounds possible.

        Regards
        George Burgess
        • SystemAdmin
          SystemAdmin
          124 Posts
          ACCEPTED ANSWER

          Re: DFHXCURM exit routine

          ‏2012-12-19T17:24:44Z  in response to SystemAdmin
          Hi

          I understand what you mean and I think that you're right.
          But my wish is to make dynamic update of this table to say now this CICS is not running or now this other one is up. The purpose is to manage a status for each CICS. Batchs jobs or Rexx procedures could update the status depending on the context.
          The anchor point of the DFHXCURM table is URMANCH and I don't see a way to access it with a batch program or a rexx procedure.
          So my question is rather where storing data to make it avalaible for everyone who wants to make status udpdate of the table.
          I hope you will understand what i'm saying.

          Regards
          Michel PAUCHARD
          • SystemAdmin
            SystemAdmin
            124 Posts
            ACCEPTED ANSWER

            Re: DFHXCURM exit routine

            ‏2012-12-19T21:30:07Z  in response to SystemAdmin
            Hi

            I don't know of a way that one can dynamically obtain the current status of a particular CICS region however there is a comment in DFHXCURM that states if URMANCH is zero then storage is obtained for URMANCH for use on subsequent invocations. This storage "could" contain a flag indicating the state of a regions as at the last attempt to connect to it.

            You may be able to find a solution to the region status question by using PLTPI and PLTSD programs.

            Suggest you raise a Request for Enhancement(RfE) and see what response you get

            Regards
            George Burgess
          • JohnTilling
            JohnTilling
            7 Posts
            ACCEPTED ANSWER

            Re: DFHXCURM exit routine

            ‏2012-12-20T10:22:38Z  in response to SystemAdmin
            The idea of DFHXCURM is that not only does it get driven on allocate_pipe requests to allow you to choose which CICS to connect to, but it also gets driven on retryable errors such as no_CICS on an open_pipe request, so that the DFHXCURM can update the table to say this CICS is not available, so that future allocate_pipe requests from different users can choose a different CICS.
            • SystemAdmin
              SystemAdmin
              124 Posts
              ACCEPTED ANSWER

              Re: DFHXCURM exit routine

              ‏2012-12-20T13:52:08Z  in response to JohnTilling
              hi

              I agree with all your answers.
              But if the CICS is stressing (SHORT ON STORAGE) DFHXCURM doesn't receive a retryable error and continue to send allocate_pipe requests to the stressing CICS.

              Regards
              • SystemAdmin
                SystemAdmin
                124 Posts
                ACCEPTED ANSWER

                Re: DFHXCURM exit routine

                ‏2013-01-08T07:43:24Z  in response to SystemAdmin
                Hi

                When CICS is SOS it cannot attach a new task and so cannot send a response back to the EXCI client - the incoming request is left hanging until either the SOS condition ends or the region fails.
              • mikegia5
                mikegia5
                1 Post
                ACCEPTED ANSWER

                Re: DFHXCURM exit routine

                ‏2013-01-18T16:24:04Z  in response to SystemAdmin
                I am planning to write a similar routine for our batch programs that access CICS via EXCI, but I plan to use CPSM to dynamically build the list. They would pass the name of a CPSM sysgroup instead of an applid and then I find the best region to route to. Not sure you would want to do that with CTG though...
                • SystemAdmin
                  SystemAdmin
                  124 Posts
                  ACCEPTED ANSWER

                  Re: DFHXCURM exit routine

                  ‏2013-03-14T10:10:55Z  in response to mikegia5
                  If you want to build an HA solution for use with the CTG there are several other options to consider besides writing your on XCURM, as this only supports EXCI requests, and only supports limited HA topologies as EXCI pipes are cached by the Gateway daemon.

                  You should consider

                  1. CTG V8.1 for z/OS provides built in policy-based Dyanmic Server Selection

                  2. SupportPac CA1T which drives the CICS Request Exit. This provides round robin and failover request balancing topologies, which are configured by simple text files and supports CICS TG V7.2 for z/OS or later
                  If you want an example of a DFHXCURM exit then you can always try the sample provided with IBM Redbook "Exploring Systems Monitoring for CICS Transaction GatewayV7.1 for z/OS" at ftp://www.redbooks.ibm.com/redbooks/SG247562 which provides an example XCURM shoing how to create a table of CICS systems for balancing Allocate_Pipe requests

                  What version/platform of CTG are you using?

                  Phil Wakelin
                  IBM Hursley