Updating an older translation file to work under the new fetch behavior

To copy only the sub-field content, use the sub-field-level address as the source instead of the field-level address.

For example:

{ { OP COPY }
         { ERR 0 }
        { PRE {
#Note: Shows $xlateInVals
            puts "xlateInVals is: $xlateInVals"
        }}
        { IN Test.[1] }
{ OUT @tmp_test }
}

This copies only the second sub-field content B to the destination; xlateInVals is B only.

To copy the whole field content, but have written a pre-proc to handle the xlateInVals list, keep using the field-level address in the source. Then, update the pre-proc.

An example of a convenient method to update your proc is:

    { { OP COPY } 
        { ERR 0 }
        { PRE {
#Note: Shows $xlateInVals

            puts "The original xlateInVals is: $xlateInVals"
            regsub -all {-} $xlateInVals { } xlateInVals            <-- Replace 
the sub-field separator char with space, so that xlateInVals will become a list.
            puts "The xlateInVals after regsub is: $xlateInVals"
            lassign $xlateInVals a b c
            puts "$a:$b:$c"
        }}
        { IN Test }
        { OUT @tmp_test }
    }

This shows:

  • The original xlateInVals is A-B-C
  • The xlateInVals after regsub is A B C
  • A:B:C