The REVERSE function returns a character string that is exactly the same length as the argument, whose characters are exactly the same as those specified in the argument, except that they are in reverse order.
The function type depends on the argument types, as follows:
| Argument Type | Function Type |
|---|---|
| Alphabetic | Alphanumeric |
| Alphanumeric | Alphanumeric |
| DBCS1 | DBCS1 |
| |
Format >>-FUNCTION REVERSE--(argument-1)------------------------------><
+-------------------------------IBM Extension--------------------------------+
Argument-1 can be DBCS or national.
+----------------------------End of IBM Extension----------------------------+
If argument-1 is a character string of length n, the returned value is a character string of length n such that, for 1 <= j <= n, the character in position j of the returned value is the character from position n-j+1 of argument-1.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.