Creating a CICS request exit

The CICS request exit is called by CICS® Transaction Gateway in remote mode, to select a CICS server name for an ECI or ESI request. The CICS request exit can be used for request retry, dynamic server selection and for rejecting non-valid requests. If the server name returned by a CICS request exit is null, the request is sent to the default CICS server if one is specified in the configuration file (ctg.ini).

Before you begin

If a request fails with a retryable error and the retry limit has not been reached, the Gateway daemon calls the CICS request exit to select an alternative CICS server. The following errors are retryable:
  • The specified CICS server is no longer available (ECI_ERR_CICS_DIED or ESI_ERR_CICS_DIED)
  • A connectivity problem has occurred (ECI_ERR_RESOURCE_SHORTAGE or ESI_ERR_RESOURCE_SHORTAGE)
  • The specified CICS server is not available (ECI_ERR_NO_CICS or ESI_ERR_NO_CICS)

You can pass a command to a CICS request exit dynamically using the CREXIT administration option; for more information see CICS request exit control.

About this task

To configure and deploy a CICS request exit use the following steps:

Procedure

  1. Create a Java™ class that implements the com.ibm.ctg.ha.CICSRequestExit interface.
  2. Compile the Java class and package it into a JAR file.
  3. Copy the JAR file to a location in your file system accessible by the Gateway daemon.
  4. Update the CLASSPATH environment variable in the Gateway daemon configuration to include the location of the JAR file containing your exit.
  5. Specify the fully-qualified package name of your exit class by using the cicsrequestexit parameter in the configuration file (ctg.ini). For example, to deploy the sample RoundRobinCICSRequestExit, specify this:
    cicsrequestexit=com.ibm.ctg.samples.ha.RoundRobinCICSRequestExit
  6. Start the Gateway daemon.

Task Task

Feedback


Timestamp icon Last updated: Tuesday, 19 November 2013


https://ut-ilnx-r4.hursley.ibm.com/tg_latest/help/topic/com.ibm.cics.tg.doc//progde/cicsreqexit.html