%Upper meta-SQL element
Syntax
%Upper(charstring)
Description
The %Upper construct converts the string charstring to uppercase. You can use wildcards with charstring, such as the percent sign (%).
Note:
This meta-SQL construct is not implemented for COBOL.
Parameters
| Parameter | Description |
|---|---|
|
charstring |
Specify the string to convert to uppercase. |
Example
SELECT EMPLID, NAME FROM PS_EMPLOYEES WHERE %UPPER(NAME) LIKE %UPPER(sch%)
Considerations with COBOL and Unicode
COBOL's uppercase function is not Unicode-aware, and corrupts Unicode data. To use an uppercase function with COBOL, use the function supplied with PeopleTools called PTPUPPER.
The syntax to call PTPUPPER is:
CALL 'PTPUPPER' USING SQLRT
<any PIC S9(4) COMP field that contains the fields
defined length (non-unicode)>
<the String field - max PIC X(8192).>
The following is an example from Unicode-expanded source code:
01 W-WORK.
02 W-DESCR PIC X(90) VALUE SPACES.
02 W-SIZE PIC S9(4) COMP VALUE +30.
CALL 'PTPUPPER' USING SQLRT
W-SIZE OF W-WORK
W-DESCR OF W-WORK