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


Chapter 3 Tools : LENGTH

LENGTH
Returns the length of the specified string. (F)
Invocation
number = LENGTH(string)
 
The string whose length is to be returned. Its syntax can be C (fixed-length character string), UN (Unicode), V (variable-length character string), or W (double-byte character).
Usage Notes
The current length of string is returned, not the definition length.
Example
The following rule determines the length of a string and prints it to the message log:

 
RULE EDITOR ===>
LENGTH_1;
_ LOCAL NUMBER;
_ ------------------------------------------------------------------------
_ ------------------------------------------------------------+-----------
_ NUMBER = LENGTH('THIS IS THE SOURCE STRING'); | 1
_ CALL MSGLOG('THE SOURCE STRING HAS A LENGTH OF: ' || | 2
_ NUMBER); |
_ ------------------------------------------------------------------------

 
Output for the LENGTH_1 Rule
Pressing PF2 after executing this rule displays the following:

 
----------------------- INFORMATION LOG --------------------
COMMAND ===> SCROLL ===> P
THE SOURCE STRING HAS A LENGTH OF: 25

 

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