Technical Blog Post
Abstract
Quick check for ITM situation(s) triggering
Body
Think a situation should be firing and it isn't? You can always do a quick and dirty check to see what is happening at the HUB by using the kdstsns tool to query the TEMS database. This is an internal tool and it is an easy way to "dump" information from the TEMS tables.
It is located under the following directories:
- Windows - $CANDLEHOME\cms
- UNIX - $CANDLEHOME/Mplatform>/ms/bin
You must set SQLLIB to the location where the SQL you want to run resides.
example:
- WINDOWS: set SQLLIB=c:\IBM\ITM\cms\sqllib
- UNIX: export SQLLIB=/opt/IBM/ITM/<platform>/ms/bin/sqllib
kdstsns can be run from the CLI or interactively.
example of CLI
- kdstsns FILE.SQL *HUB
- kdstsns FILE.SQL *HUB > file.out (to pipe the output to a file)
example of interactive:
C:\IBM\ITM\CMS>kdstsns
To terminate the program at any time, enter "end"
Enter NCS Address Family or "Node" (default: *HUB):ip.pipe (this is the protocol)
Enter host name/address :MY-HOSTNAME (the hostname for the HUB)
Enter NCS Server Port Number (eg. 1024, ....):1918 (the port to communicate on)
Path Specification:
NCS:{SOCKET=ip.pipe:IBM-211ADFE64C0[1918]} CT/DS:{SERVER=SRVR01 USER=DSTSNS}
Socket Specifcation:
ip.pipe:MY-HOSTNAME[1918]
Server Version: 622 Build: 11080 Host Type: 6 Host Level: 1 Feature: NLS=Y
Requester Version: 622 Build: 11080 Host Type: 6 Host Level: 1 Feature: NLS=Y
Server Options: Case Matching = 0
Enter SQL member name (or "end" to quit) ... predicate.sql
The SQL will be this:
SELECT RULENAME, PREDICATE
FROM O4SRV.SITDB;
RULENAME will look similar to the situation name. Take the PREDICATE, it is the SELECT statement and repeat the above. If a row is returned
then the situation should be firing. If no rows are returned then it will not fire.
NOTES: The *.sql extension is optional on the member (script) name when calling the command, so "kdstsns FILE *HUB" works as well
When querying tables on remote TEMS's, the interactive method is required unless you alter the SQL in the member file to add the "AT ( ...)" clause
example:
SELECT RULENAME, PREDICATE
FROM O4SRV.SITDB
AT ('tems name');
UID
ibm11083471