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.
About this task
Before you can use CICS® Transaction Gateway to record or stub, make sure of these things:
- HCL Quality Server, which is included in HCL OneTest™ Virtualization product offering, must be installed and configured. For information about installing HCL Quality Server, refer to Installation of HCL OneTest API Agent.
- The class path of the CICS® Transaction Gateway daemon must be edited 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.For information about the package, see HCL OneTest API tool packages
- 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 as follows: -
Configure the CICS TG Daemon to include the HCL OneTest™ API CICS TG
recording JAR file. You must specify both the
classpath
andrequest monitoring exit classname
.Start the CICS TG Daemon by using one of thectgservice
,stgstart
, orctgd
commands as appropriate. The steps you follow are slightly different for Windows and non-Windows computers.-
On Windows computers, the CICS Transaction Gateway typically runs as a service. To add parameters to the service, use the ctgservice.exe program that is typically found in the bin folder of the CTG installation; for example, C:\Program Files (x86)\IBM\CICS Transaction Gateway\bin. To verify the parameters, open the Windows registry and check the entry for the service. Typically, it is at
.HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\IBMCICSTransactionGateway\Parameters
-
On non-Windows computers, use the parameters with the ctgstart program that is typically found in the bin folder of the CTG installation; for example, /opt/ibm/cicstg/bin.
Following is an example:./ctgstart -classpath=/opt/ibm/cicstg/classes/com.ibm.rational.rit.ctg.jar -j-Dgreenhat.logappender.console.CONSOLE=layout:detailed
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:
For more details about ctgservice.exe, ctgservice command reference.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.