######################################################################
# Name: xltp_fixordnum
# Purpose:
# 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.
#
# Purpose: to remove the first dash in the order number
#
# Usage: this will be called as a code fragemnt to fix the order number for the OSU
proc xltp_fixOrdnum {} {
upvar xlateId xlateId
xlateInList xlateInList
xlateInTypes xlateInTypes
xlateInVals xlateInVals
xlateOutList xlateOutList
xlateOutTypes xlateOutTypes
xlateOutVals xlateOutVals
set ordnum [lindex $xlateInVals 0]
echo “order number: ” $ordnum
set ordnumLength [string length $ordnum]
echo “length: ” $ordnumLength
set count 0
set neword “”
while {$count != $ordnumLength} {
set chr [string index $ordnum $count]
if {$count != “3”} {
append neword $chr }
incr count 1 }
echo “neword: ” $neword
set xlateOutVals
}
Here is my log, from a translate i am copying the order number and calling the code frag.. It is not triming the value out when the message leaves the engine. Seems like the value of the neword varible is not populating to xlateOutVals however if i echo the xlateOutVals it does show the order number without the dash character. I do need the second dash though. Here is a shot of the logs to show that the code is doing what it should, except for putting it back in place.
[prod:prod:INFO/0: STARTUP_TID] Engine process is 5380 on host wpmusetests1
[prod:prod:INFO/1:nw_muse_OB_results_cmd] Msg space limit is 0
[prod:prod:INFO/0:nw_muse_OB_results_cmd] DiskQue Minimum # of Messages/que: 50
[prod:prod:INFO/0:nw_muse_OB_results_cmd] DiskQue Virtual Memory percent:75.000000
[prod:prod:INFO/0:nw_muse_OB_results_cmd] Applying EO config: ”
[prod:prod:INFO/0:nw_muse_OB_results_xlate] Applying EO config: ”
[prod:prod:INFO/0:nw_muse_OB_ORU] Applying EO config: ”
[prod:prod:INFO/0:nw_muse_ORU_his] Applying EO config: ”
TrxID based on MSH-3 is: MUSE ECG Result 1
order number: ECG-20060921-0004
length: 17
neword: ECG20060921-0004
Engine idle — 09/29/2006 19:25:13