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


Chapter 3 Tools : SEARCH_REPLACE

SEARCH_REPLACE
Replaces all occurrences of a pattern with specified characters. (F)
Invocation
new_string = SEARCH_REPLACE(input_string, replace_this, ­with_these, else_with_this)
 
A character string that you can use to replace any other occurrences of the pattern, after the list in with_these is exhausted.
Usage Notes
If you do not specify a value for replace_this, the original string (input_string) is returned.
If you do not specify a value for with_these, supplying only a value for else_with_this, all occurrences of the pattern are replaced with the else_with_this value.
Example
The following rule removes the underscores and truncates a TIBCO Object Service Broker name to eight characters so that it is a valid name for an object outside TIBCO Object Service Broker.

CONVERT_NAME(NAME);
_
_ ---------------------------------------------------------------------
_ ------------------------------------------------------------+--------
_ RETURN(HEADSTRING(SEARCH_REPLACE(NAME,'_','',''),8)); | 1
_ ---------------------------------------------------------------------

 
If you execute:
CONVERT_NAME(EMP_INT_TABLE)
the returned string is:
EMPINTTA

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