- This topic has 4 replies, 2 voices, and was last updated 14 years, 7 months ago by .
-
Topic
-
Clearly I am missing something obvious (this happens all the time) with an Xlate I am trying to do and cannot seem to get to work for the life of me. I’ve got a situation where I am trying to “clean up” some incoming data when I send it out. Specifically, I have TXA-23 coming in with (possibly) multiple repeating values, eg:
|ABC~XYZ|
This is fine as far as it goes, but sometimes what comes in (sending system’s fault) is something like:
|~ABC|
In this scenario I would like to “clean up” that field and send it out as:
|ABC|
for the benefit of the receiving system, which creates false errors if the first occurrence is empty. However, if there are multiples, like the first example, I’d like that to go out as is.
What I tried to do was set up a counting mechanism, and evaluate the value of the occurences via the ITERATE command, and map them out if valued but not if unvalued, like so:
COPY =0 —> @TXA23CNTITERATE
(Type: field, Basis: 0.(0).TXA.#23, Variable %f1)[code]
COPY =0 —> @TXA23CNTITERATE
(Type: field, Basis: 0.(0).TXA.#23, Variable %f1)
- The forum ‘Cloverleaf’ is closed to new topics and replies.