Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tools : UPPERCASE

UPPERCASE
Converts all lowercase characters in a string to uppercase characters. (F)
Invocation
upper_string = UPPERCASE(string)
 
On return, contains the string in uppercase letters. Its syntax is the same as string except that, if string is C (fixed-length character string), upper_string becomes V (variable-length character string).
The string to convert to uppercase letters. Its syntax can be C, UN (Unicode), V, or W (double-byte character).
Usage Note
UPPERCASE uppercases EBCDIC strings using the TIBCO Object Service Broker EBCDIC casing rules and Unicode strings using the TIBCO Object Service Broker Unicode casing rules.
The casing for EBCDIC depends on the locale and is explained in TIBCO Object Service Broker National Language Support. The default Unicode casing supplied with the product is the recommended default from the Unicode consortium. You can tailor it for your environment.
For example, “ç” cases to “Ç” in the default Unicode rules and remains unchanged using the EBCDIC rules for Swedish.
Example
The following rule uppercases a string and prints the result to the message log:

 
UPPERCASE_SAMPLE;
_ LOCAL A;
_ -----------------------------------------------------------------
_ ------------------------------------------------------------+----
_ A = U'AÇaç'; ¦ 1
_ CALL MSGLOG('CASING OF UNICODE STRING ' || A); ¦ 2
_ CALL MSGLOG(' '); ¦ 3
_ CALL MSGLOG('UPPERCASE GIVES ' || UPPERCASE(A)); ¦ 4
_ CALL MSGLOG('SYNTAX IS ' || $GET_SYNTAX(UPPERCASE(A)); ¦ 5
_ A = $TYPECAST('S', 'V', 4, 0, A); ¦ 6
_ CALL MSGLOG(' '); ¦ 7
_ CALL MSGLOG('CASING OF EBCDIC STRING ' || A); ¦ 8
_ CALL MSGLOG(' '); ¦ 9
_ CALL MSGLOG('UPPERCASE GIVES ' || UPPERCASE(A)); ¦ A
_ CALL MSGLOG('SYNTAX IS ' || $GET_SYNTAX(UPPERCASE(A)); ¦ B

 
Line 1 sets local variable A as a Unicode string. Line 6 changes it to an EBCDIC V string.
Resulting Output
Pressing PF2 after executing this rule displays the following screen:

 
----------------------- INFORMATIONAL MESSAGE LOG --------------------
COMMAND ===> SCROLL ===> P
 
CASING OF UNICODE STRING AÇaç
UPPERCASE GIVES AÇAÇ
SYNTAX IS UN
CASING OF EBCDIC STRING AÇaç
UPPERCASE GIVES AÇAç
SYNTAX IS V

 
See Also
Related tools: LOWER_EBCDIC, LOWER_UNICODE, LOWERCASE, UPPER_EBCDIC, and UPPER_UNICODE.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved