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


Chapter 3 Tools : UPPER_EBCDIC

UPPER_EBCDIC
Converts a string to uppercase EBCDIC characters. (F)
Invocation
upper_string = UPPER_EBCDIC(string)
 
If string is not Unicode, or if it is Unicode and entirely convertible to EBCDIC, upper_string’s syntax is V (variable-length character string).
If string is Unicode and not entirely convertible to EBCDIC, upper_string’s syntax is UN (Unicode). In string, characters that can be converted are cased and then reverted to Unicode before being added to upper_string. Characters that cannot be converted are added to upper_string unchanged.
The string to convert to uppercase letters. Its syntax is C (fixed-length character), RD (raw data), UN, V, or W (double-byte character).
Usage Note
UPPER_EBCDIC uppercases strings using the TIBCO Object Service Broker EBCDIC casing rules.
The casing for EBCDIC depends on the locale and is explained in TIBCO Object Service Broker National Language Support.
For example, “ç” remains unchanged when the EBCDIC rules for Swedish are in use.
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('UPPER_EBCDIC GIVES ' || UPPER_EBCDIC(A)); ¦ 4
_ CALL MSGLOG('SYNTAX IS ' || $GET_SYNTAX(UPPER_EBCDIC(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('UPPER_EBCDIC GIVES ' || UPPER_EBCDIC(A)); ¦ A
_ CALL MSGLOG('SYNTAX IS ' || $GET_SYNTAX(UPPER_EBCDIC(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ç
UPPER_EBCDIC GIVES AÇAç
SYNTAX IS V
CASING OF EBCDIC STRING AÇaç
UPPER_EBCDIC GIVES AÇAç
SYNTAX IS V

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

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