Before switching on the TrilliumSAPNW64 trace, you need to set the environment variables as described in the following procedures.
To set the environment variable in Windows
Open the System Properties window in the Windows control panel (Control Panel > System > Advanced).
Select the Environment Variables tab and create the variable
TRILLTRACEFILE
, setting its value to the path and file name in which you want to create the trace file. The figure below shows an example of the variable definition.Figure 1. Edit System Variable Setting WindowClick OK and then click OK again when the list of environment variables window opens.
Open the registry editor and navigate to HKLM > SYSTEM > ControlSet001 > Services > TSQSAPClient17_X64.
Set the TraceFlag to 1 as shown in the figure below and click OK.
Figure 2. Registry’s Edit DWORD Value for TraceFlagRestart the system and the TrilliumSAPNW64.
To set the environment variable in Linux
Edit
runclient.sh
which is located in /opt/tsq/Software/bin.Add the environment variable TRILLTRACEFILE specifying the location of the trace file to be created, and add the -t parameter setting with the location.
Highlighted below is an example in
runclient.sh
:Runclient.sh
#! /bin/sh
n=$1
if test -z "${n}" ; then
echo
echo Please enter the number of the client to be started.
echo
exit 99
fi
echo TrilliumSAPNW64 $n
#================== These may need to be changed ==================
TRILSAPCONFIG=/opt/tsq/Software/conf/TrilSAP.cfg
RFC_INI=../conf/sapnwrfc.ini
LD_LIBRARY_PATH=/opt/tsq/Software/bin:$LD_LIBRARY_PATH
TRILLDIRADDR=localhost
TRILLDIRPORT=15400
#=================================================================
RFC_TRACE_DIR=../logs/SAP/client$n
export RFC_TRACE_DIR RFC_INI LD_LIBRARY_PATH TRILLDIRADDR TRILLDIRPORT TRILSAPCONFIG
TRILLTRACEFILE=$RFC_TRACE_DIR/tSAPClient.trc
export TRILLTRACEFILE
while(:)
do
# ./TrilliumSAPNW64 -f $TRILSAPCONFIG -l $RFC_TRACE_DIR/tSAPClient.log -D TRILLIUM_R -m 1
./TrilliumSAPNW64 -f $TRILSAPCONFIG -l $RFC_TRACE_DIR/tSAPClient.log -t $RFC_TRACE_DIR/tSAPClient.trc -D TRILLIUM_R -m 1
ret=$?
if test $ret -eq 0 ; then
echo Client ended with return code $ret at `date`
exit 0
fi
echo
echo Client ended with return code $ret at `date`
echo Client restarting at `date`
echo
doneexit 0
Restart the TrilliumSAPNW64 client.
Go to the /logs directory and ensure that the trace file has been activated.