Returns a byte sequence that results from replacing or dropping bytes in the first of its arguments as specified by the patterns of its other arguments.

The format for the $ZTRANSLATE() function is:


The $ZTRANSLATE() algorithm can be understood as follows:

Examples of $ZTRANSLATE()


GTM>set hiraganaA=$char(12354) ; $zchar(227,129,130) 

GTM>set temp1=$zchar(130)

GTM>set temp2=$zchar(140)

GTM>set tr=$ztranslate(hiraganaA,temp1,temp2)

GTM>w $ascii(tr)

In the above example, $ZTRANSLATE() replaces byte $ZCHAR(130) in first expression and matching the first (and only) byte in the second expression with byte $ZCHAR(140) - the corresponding byte in the third expression.