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


Chapter 3 Tools : LIT_TO_VAL

LIT_TO_VAL
Converts a string to a typeless value as described in the string. (F)
Invocation
new_value = LIT_TO_VAL(string)
 
On return, this value is the value described in string. Its semantic data type is typeless.
The string to convert. Its syntax can be C (fixed-length character string) or V (variable-length character string).
The syntax of new_value depends on the format of string as follows:
Example
The following rule creates three new values from the information contained in a string:

 
CREATE_RD;
_ LOCAL SOURCE_STRING, NEW_RD_VALUE, NEW_UN_VALUE, NEW_X_VALUE;
_ ------------------------------------------------------------------------
_ ------------------------------------------------------------+-----------
_ SOURCE_STRING = 'R''1234'''; |
_ NEW_RD_VALUE = LIT_TO_VAL(SOURCE_STRING); |
_ SOURCE_STRING = 'U''/20AC//1234'''''''; |
_ NEW_UN_VALUE = LIT_TO_VAL(SOURCE_STRING); |
_ SOURCE_STRING = 'X''5BF1F2F3F4'''; |
_ NEW_X_VALUE = LIT_TO_VAL(SOURCE_STRING); |
_ ------------------------------------------------------------------------

 
NEW_RD_VALUE is now a raw data value that contains “1234”.
NEW_UN_VALUE is a Unicode value containing “€/1234' ” ( = the euro symbol).
NEW_X_VALUE is a variable-length character value that contains “$1234”.

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