Since you have multiple ORC messages in the message, the assumption is that you must loop over all of them, using the ITERATE Xlate command. One of the things you specifiy in the ITERATE is a variable, which keeps track of which group you are processing. The solutions defined below take advantage of the fact that you have this built in variable, and use it as your counter, allowing the ITERATE to initialize it. However, the variable, %g1, starts its count at 0, so it will always be one behind what you want it to be for adding to your value.
In my example, xlateInVals is a list of the arguments on the Source side of the COPY statement. The first element (index=0) in the list is the field from which you get the value 81253, and the second element (index=1) in the list is the value of %g1 on the first iteration, which is always 0.
lindex grabs the values from that list, based off their index. For example, if you were in the first iteration on the group, your xlateInVals list would look like:
xlateInVals={81253 0}
set invalue [lindex $xlateInVals 0]
set itervar [lindex $xlateInVals 1]
sets the values of the variables to:
invalue=81253
itervar=0
You need to increment itervar to be 1, so the first time through you concatenate .001 to your result. The second time through the iteration, %g1 will be 1, so you need to increment it again, so you concatenate .002 to your result. Basically, %g1 is always one behind what you want to concatenate.
For the second solution, you would again be using the iteration variable, %g1, as the basis for counter, but since the iteration variable starts at 0, and you want to start your concatenation at 1, you need to increment the iteration variable, MATH ADD, to a temporary variable @var, then divide that variable by 1000, MATH DIV, before concatenating it to your value using CONCAT.
Hope this helps,
Robert Milfajt
Northwestern Medicine
Chicago, IL