It funny that you should mention that…I tried this also:
echo $xlateInVals
set numbertoformat [lindex $xlateInVals 0]
echo $numbertoformat
set OutVal [format “%04d” $numbertoformat]
echo $OutVal
set OutList
with the following results:
3
3
0003
0003
0003
MESSAGE 1
0(0).MSH(0) : >|^~&|MCKESSON|AGH|HNAM|050|20050314150856||ADT^A08|07378|P|2.3|||AL|NE<
0(0).EVN(0) : >|A08|20050314150837<
blah…blah…blah…
0(0).DG1(1) : >|3|||THIS IS JUST A TEST – ADMITTING DIAGNOSIS TEXT – IT IS THIS LONG >>>>>>>>>||AD<
You can see that the format is working correctly…just not getting to the DESTINATION.
😕 😕