Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

UPPER-CASE - Uppercase letters

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
national

alphanumeric
alphanumeric
national

Format


FUNCTION UPPER-CASE (argument-1)


Arguments

  1. argument-1 must be class alphabetic, alphanumeric or national and must be at least one character in length.

  2. argument-1 must not be defined in the ANY LENGTH clause.

Returned values

  1. The same character string as argument-1 is returned, except that each lowercase letter is replaced by the corresponding uppercase letter.

  2. The character string returned has the same length as argument-1.

  3. Umlauts are not converted.

  4. 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