UPPERCASE

Start of changeUPPERCASE returns a character string with all characters converted to their uppercase equivalent. End of change

Read syntax diagramSkip visual syntax diagram
>>-UPPERCASE-(x-+----+-)---------------------------------------><
                '-,c-'     

x
An expression. If necessary, x is converted to character.
Start of changecEnd of change
Start of changeAn expression that specifies the code page that will be uppercased.End of change

Start of changeUPPERCASE(x) is equivalent to TRANSLATE(x, 'A...Z', 'a...z') and UPPERCASE(x, c ) is equivalent to TRANSLATE(x, upperc, lowerc). The values of upperc and lowerc are determined by the value of the code page c. Specifying UPPERCASE(x, c) will not only translate alphabetic characters 'a...z' to 'A...Z', but also translate characters such as lowercase ä-umlaunt('c0'x) to uppercase Ä-unlaut('4a'x).End of change

Start of changeFor example, if the Lower_01141 was declared as: Start of change
dcl lower_01141 char
 value( (
              '8182838485868788'8991929394959697'x
           || '9899A2A3A4A5A6A7A8A9424445464748'x
           || '4951525354555657'586A708C8D8E9CC0'x
           || 'CBCDCECFD0DBDDDE'x
        ) );  
End of change and the Upper_01141 was declared as:Start of change
dcl upper_01141 char
  value( (
              'C1C2C3C4C5C6C7C8C9D1D2D3D4D5D6D7'x
           || 'D8D9E2E3E4E5E6E7E8E9626465666768'x
           || '6971727374757677'78E080ACADAE9E4A'x
           || 'EBEDEEEF5AFBFDFE'x
        ) );      
End of change then UPPERCASE(x, 1141 ) would be the same as TRANSLATE( x, Upper_01141, Lower_01141 ).End of change

Start of changeThe appendix lists the values of upperc and lowerc for the supported values of c. For details, see TRANSLATE and Limits.End of change