Enabling recording and stubbing in the CICS® Transaction Gateway daemon
As an alternative to a CICS® Transaction Gateway client application, you can use the CICS® Transaction Gateway daemon for recording and stubbing.
Before you begin
About this task
- Installed and configured HCL Quality Server, which is included in HCL OneTest™ Virtualization product offering. For information about installing HCL Quality Server, refer to Installing HCL OneTest Virtualization.
- Edited the class path of the CICS® Transaction Gateway daemon to include the HCL OneTest™ API CICS TG Recording JAR file.
Procedure
- Download and extract the CICS® Transaction Gateway exits package, IBMCICSTransactionGateway.zip, that is provided with HCL Quality Server into a location.
-
Copy the HCL OneTest™ API CICS TG Recording JAR file and supporting files to the system that is running the CICS® Transaction Gateway daemon.
The files are as follows:
- com.ibm.rational.rit.ctg.jar
- registration.xml
-
Edit the
registration.xml
file and perform the following changes: -
Configure the CICS TG Daemon to include the HCL OneTest™ API CICS TG recording JAR file by specifying the classpath and request monitoring exit classname parameters. Complete the following steps:
The steps you follow are slightly different for s.
com.ibm.rational.rit.CTGRecordingExit
andcom.ibm.rational.rit.CTGDaemonIntercept
.This action updates the ctg.ini file as follows:requestexits=com.ibm.rational.rit.CTGRecordingExit cicsintercept=com.ibm.rational.rit.CTGDaemonIntercept
- Optional:
To customize the run-time environment, use the ctgservice.exe program. In
the following example, the JAR file is added to the classpath and logging is enabled (in debug mode)
for the exit:
ctgservice.exe -R -A-classpath="C:\Program Files (x86)\IBM\CICS Transaction Gateway\classes\com.ibm.rational.rit.ctg.jar" -A-j-Dgreenhat.logappender.console.CONSOLE=layout:detailed,level:DEBUG
The following text block shows a sample output:C:\Program Files (x86)\IBM\CICS Transaction Gateway\bin>ctgservice.exe -R -A-classpath="c:\Program Files (x86)\IBM\CICS Transaction Gateway\classes\com.ibm.rational.rit.ctg.jar" -A-j-Dgreenhat.logappender.console.CONSOLE=layout:detailed,level:DEBUG CTG9512I CTGSERVICE - CICS Transaction Gateway Windows Service Utility CTG9513I (C) Copyright IBM Corporation 2009, 2016. All rights reserved. CTG9518I Gateway daemon parameter overrides are: -A-classpath=c:\Program Files (x86)\IBM\CICS Transaction Gateway\classes\com. ibm.rational.rit.ctg.jar -A-j-Dgreenhat.logappender.console.CONSOLE=layout:detailed,level:DEBUG
Note: Adding the JAR file and registration.xml to the CTG classes folder does not automatically enable the proxy code. You must explicitly add the JAR file to the classpath.For information on setting the classpath to point to the
com.ibm.rational.rit.ctg.jar
file, see CICS TG Command reference. For information on how to configure the request monitoring exit classnamecom.ibm.rational.rit.CTGRecordingExit
, see Configuring request monitoring exits for the Gateway daemon.
Configuring the Exit on non-Windows computers
For non-Windows computers, the CICS® Transaction Gateway Exit installer is a single executable.
Before you begin
- The Korn shell (32-bit application)
- KSH and required libraries added to the operating system including their 32-bit versions
# yum search curses
…
ncurses-libs.i686 : Ncurses libraries
ncurses-libs.x86_64 : Ncurses libraries
About this task
On a 64-bit operating system, yum install ncurses-libs
installs the 64-bit
version only. Run yum install ncurses-libs.i686
to add the 32-bit version.
The default location of the installation is /opt/ibm/cicstg. The
configuration and logging files are by default located at /var/cicscli
.
Procedure
- In the CICS® Transaction Gateway Exit Configuration tool, enable the monitoring and intercept exits as outlined in the previous procedure (for Windows).
-
To start the CICS® Transaction Gateway Exit, run the
following command in the bin folder:
./ctgstart -classpath=/opt/ibm/cicstg/classes/com.ibm.rational.rit.ctg.jar -j-Dgreenhat.logappender.console.CONSOLE=layout:detailed,level:DEBUG
For more details about ctgstart, ctgstart command reference.