TRANSLATE Function: z/OS

Replaces specific characters in a character expression.
Category: Character
z/OS specifics: to/from pairs
See: TRANSLATE Function in SAS Functions and CALL Routines: Reference


TRANSLATE(source, to-1, from-1, <... to-n, from-n> )

Required Arguments

specifies the SAS expression that contains the original character value.
specifies the characters that you want TRANSLATE to use as substitutes.
specifies the characters that you want TRANSLATE to replace.


Under z/OS, you must specify pairs of to and from arguments. Also, there is no practical limit to the number of to or from pairs that you can specify.
TRANSLATE handles character replacement for single-byte character sets only. See KTRANSLATE to replace single-byte characters with double-byte characters, or to replace double-byte characters with single-byte characters.