Perfect. This all helps me see the things I’ve missed. All have been useful for me to figure this out. I appreciate the help thus far from everyone.
I do have it now storing into a list and if I add multiple outputs to the xlate like James recommended, I can then grab each one individually by calling the variable I’ve saved them into.
I’m still not able to retrieve them by list index, so if I enter something like this, with the next index:
set item [lindex $xlateInVals 1]
set xlateOutVals $item
I get a blank. So it’s clearly still thinking it’s in one field it appears. Which reflects what James said. Right now if I know how many to expect inbound it wouldn’t be an issue because I can just create that many variables in my output on my COPY statement and build it from there. So it still seems like even when I’m placing the list into one output variable, I’m not able to grab them by index, but maybe that’s not even the correct way to approach this.
Essentially my initial thought was to put the whole list into one variable. Check it’s length, knowing how many values there are, and then grab them individually out of the list as I build the PR1 segment. It seems I can do this if I assign a output variable in my COPY to each, but how could I dynamically build the variables in the output COPY field for a varying number? Or rather, should I use hardcoded values in the output COPY, up to a max number (i.e. 5) and just check if they are empty afterward?
Thank you again.