Using the $xlateConfigFileName global variable

For better logging, the XLTP proc has access to the current xlate file name.

Use the predefined XLTP global variable $xlateConfigFileName in the PreProc/Post Proc tabs in the xlate action.

For example:

set xlateOutVals [list $xlateConfgFileName]

You can also use the predefined XLTP global variable $xlateConfgFileName in the XLTP template:

###############################################
# Name:        __MODULE_NAME__
# Purpose:     <description>
# UPoC type:  xltp
# Args:            none
# Notes:          All data is presented through special variables. The initial
#                     upvar in this proc provides access to the required variables.
#
#        This proc style only works when called from a code fragment
#        within an XLT.
#
proc __MODULE_NAME__ {} {
     upvar xlateId                    xlateId                      \
          xlateInList                    xlateInList                \
          xlateInTypes                xlateInTypes            \
          xlateInVals                   xlateInVals               \
          xlateOutList                  xlateOutList             \
          xlateOutTypes              xlateOutTypes         \
          xlateOutVals                 xlateOutVals            \
          xlateConstType             xlateConstType       \
          xlateConfigFileName   xlateConfigFileName 

}

Example

hcixlttest -i -e ASCII -d 1 -f nl actionPreProc.xlt C:/infor_dev/cis6.1.2.0/integrator/t-xpm.copy/test/actionPreProc.dat

The output would be:

xlateFile is ---------------actionPreProc.xlt --------------------
MESSAGE 1
0(0).MSH(0)  :  >|^~\&|||||||ORU||P|2.1<
0(0).MSA(0)  :  ><
1(0).0(0).PID(0)  :  >|||PATIENT||||19620416|M<