I’ve written out a list of elements to a variable @counter. The list looks something like this {1 2 3 4 5 6 7…etc}
What I want to do us use this counter as a basis for an interate and then use the variable %l1 to populate an outbound group of XML lines that contain picklist information for an application we are going to use.
The %l1 variable would indicate which line to write to. So, if the iterate was looking at element ‘2’, then I would be copying data for the second group of picklist lines. Since we can’t iterate on an outbound (WHY????), I’m trying to wrap my head around on how to do this.
Oh, and I’m going from an HL7 SIU message type to XML, just to keep things interesting. The picklist info is coming from a Tcl proc that grabs data from a database and populates some arrays containing the picklist items info (item_nbr, desc, qty), which is then returned to the XLATE.
The problem is that if I just do straight copies from these variable, (passed through a pre proc in the copy statement to grab the corresponding array elements for that rep), only the LAST group of data gets copied out. So, I really need some type if iterate.
We’re using 5.7 Rev2, so I can’t do XLATE chaining. I’m wondering if I should just be looking at writing a separate post proc procedure to fill those lines.