String function 

A string function is a function that supplies an alphanumeric value as a result.

Syntax

<string function> ::=
  <string spec> || <string spec>
| <string spec> & <string spec>
| SUBSTR    ( <string spec>, <expression>[, <expression>] )
| LFILL     ( <string spec>, <string_literal> [,<unsigned integer> ] )
| RFILL     ( <string spec>, <string_literal> [,<unsigned integer> ] )
| LPAD      ( <string spec>, <expression>, <string literal> [,<unsigned integer> ] )
| RPAD      ( <string spec>, <expression>, <string literal> [,<unsigned integer> ] )
| TRIM      ( <string spec>[, <string spec> ] )
| LTRIM     ( <string spec>[, <string spec> ] )
| RTRIM     ( <string spec>[, <string spec> ] )
| EXPAND    ( <string spec>, <unsigned integer> )
| UPPER     ( <string spec> )
| LOWER     ( <string spec> )
| INITCAP   ( <string spec> )
| REPLACE   ( <string spec>, <string spec>[, <string spec> ] )
| TRANSLATE ( <string spec>, <string spec>, <string spec> )
| MAPCHAR   ( <string spec>[, <unsigned integer> ] [, <mapchar set name> ] )
| ALPHA     ( <string spec>[, <unsigned integer> ] )
| ASCII     ( <string spec> )
| EBCDIC    ( <string spec> )
| SOUNDEX   ( <string
spec> )

string spec, expression, string literal, unsigned integer, mapchar set name

Concatenation (x||y and x&y), SUBSTR(x,a,b), LFILL(x,a,n), RFILL(x,a,n), LPAD(x,a,y,n), RPAD(x,a,y,n), TRIM(x,y), LTRIM(x,y), RTRIM(x,y), EXPAND(x,n), UPPER(x)/LOWER(x), INITCAP(x), REPLACE(x,y,z), TRANSLATE(x,y,z), MAPCHAR(x,n,i), ALPHA(x,n), ASCII(x)/EBCDIC(x), SOUNDEX(x)