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


Chapter 3 Tools : VAL_TO_LIT

VAL_TO_LIT
Converts a value to a string containing a token describing its value. (F)
Invocation
string = VAL_TO_LIT(value)
 
On return, this string contains a token describing the input value. Its syntax is V (variable-length character string).
The value to convert. It can have any syntax. The token in string depends on the syntax of value as follows:
 
Example
This rule creates three new values from the information contained in input strings:

 
CREATE_RD (VALUE1, VALUE2, VALUE3);
_
_ ------------------------------------------------------------------------
_ ------------------------------------------------------------+-----------
_ CALL MSGLOG('VALUE1 CONTAINS ' || VAL_TO_LIT(VALUE1)); |
_ CALL MSGLOG('VALUE2 CONTAINS ' || VAL_TO_LIT(VALUE2)); |
_ CALL MSGLOG('VALUE3 CONTAINS ' || VAL_TO_LIT(VALUE3)); |
_ ------------------------------------------------------------------------

 
VALUE1 is a raw data field that contains 1234.
VALUE2 is a Unicode field that contains E12/34.
VALUE3 is a string field that contains $1234.
Pressing PF2 after executing this rule displays the following screen:

 
----------------------- INFORMATIONAL MESSAGE LOG --------------------
COMMAND ===> SCROLL ===> P
     VALUE1 CONTAINS R'1234'
     VALUE2 CONTAINS U'/20AC12//34'
     VALUE3 CONTAINS X'5BF1F2F3F4'

 

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