- This topic has 6 replies, 2 voices, and was last updated 4 years, 11 months ago by .
-
Topic
-
First, I realize that when taught in class it was always recommended to not reuse iterate variables. With that said, over time, some of our Xlates have managed to reuse some iterate variables in separate (non nested) blocks. This has always functioned correctly in our current prod version 6.1.2 and previous versions.
When testing 19.1.0.1, we found that if a message meets the criteria to hit a second iterate in an Xlate that reuses an iterate variable, the process dies and dumps the memory. This was confirmed by support and the developers in China.
Just consider this an FYI if you are considering going to version 19 or above that this “rule” is now being enforced and you will need to do some re-coding of your Xlates if you managed to reuse an iterate variable.
A basic pseudo code example of this is
Iterate (IAM segment) using %s1
Pathcopy in-IAM (%s1) to out-IAM (%s1)
END Iterate
Iterate (AL1 segment) using %s1)
Pathcopy in-AL1 (%s1) to out-AL1 (%s1)
END Iterate
The iterate for AL1 (assuming there was an IAM segment, which would cause %s1 to be used) is the iterate that fails and dumps the memory.
Its odd that this just started to be enforced with 19, but in previous versions, the Xlate code worked fine. I always interpreted the iterate function as declaring or re-initializing the variable, which is why it was able to be reused prior to 19, but I guess that is not the case.
Hopefully this helps others in preparation to go to 19 because we will need to delay to rewrite some code.
- You must be logged in to reply to this topic.