The UPPER-CASE function returns a character string that is the same length as argument-1 with each lowercase letter replaced by the corresponding uppercase letter.The type of this function depends upon the argument types as follows:
Argument type | Function type |
alphabetic | alphanumeric |
Format
FUNCTION UPPER-CASE (argument-1)
Arguments
argument-1 must be class alphabetic, alphanumeric or national and must be at least one character in length.
argument-1 must not be defined in the ANY LENGTH clause.
Returned values
The same character string as argument-1 is returned, except that each lowercase letter is replaced by the corresponding uppercase letter.
The character string returned has the same length as argument-1.
Umlauts are not converted.
The error default value is a space.
See also: LOWER-CASE
Example 9-46
...
DATA DIVISION.
WORKING-STORAGE SECTION.
01 RES PIC X(20).
PROCEDURE DIVISION.
P1 SECTION.
MAIN.
MOVE FUNCTION UPPER-CASE ("wonderwoman") TO RES.
DISPLAY RES UPON T.
STOP RUN.
Result: WONDERWOMAN