Returns the transformed representation of the first argument expr in a normalized form using the alternative transform specified by the second argument intexpr; the return can be used as an operand to the follows (]) or sorts-after (]]) operator such that, if both operands are in the normalized form, the result is independent of alternative collation. The format for the $ZATRANSFORM() function is:
$ZTRANSFORM(expr,intexpr[,{0|1}][,{0|1}])
The expression specifies the string to transform.
The intexpr specifies the ID of the alternative transform to use.
The optional third argument specifies whether the transform is to normalized form, by default or if zero (0), or, if one (1), the reverse transform from the normalized to the native form..
The optional forth argument specifes whether to use standard M collation of numbers before strings, the default or zero (0), or to sort all values as strings (1).
Please see the section on $ZCOLLATE() for a similar alternative.
Example:
GTM>write $ztransform("John Smythe",1)]$zatransform("Jane Smith",2) 0 GTM>
This example uses $ZATRANSFORM() and two (here unspecified) collation definitions to compare the ordering of two (literal) expressions as GT.M would collate them if there was a way to collate them together. The result indicates that the first would collate before the second.