UPCASE Function

Converts all letters in an argument to uppercase.

Category: Character
Restriction: I18N Level 2 functions are designed for use with SBCS, DBCS, and MBCS (UTF8).

Syntax

UPCASE(argument)

Required Argument

argument

specifies a character constant, variable, or expression.

Details

In a DATA step, if the UPCASE function returns a value to a variable that has not previously been assigned a length, then that variable is given the length of the argument.
The UPCASE function copies a character argument, converts all lowercase letters to uppercase letters, and returns the altered value as a result.
The results of the UPCASE function depend directly on the translation table that is in effect (see TRANTAB system option), and indirectly on the ENCODING system option and the LOCALE system option.

Example

The following SAS statements produce this result.
SAS Statement
Result
name=upcase('John B. Smith');
put name;
 
JOHN B. SMITH

See Also