Length function

Pat Shugart ShugartP@trinity-health.org
Wed, 27 Dec 2000 11:36:27 -0500


Yes, try SIZE

>From the manual...

SIZE(string-expression)
string-expression

Specifies the input string.
Input Type: String
Function Result: Numeric

Discussion
If an item is used as the argument to SIZE, then the function returns
the size of the item, not the size of the contents of the item. If a string
expression is used, then the length of the result of the string
expression is returned.

Example
When the string-expression is a character item, this function
sometimes returns the length of the string-expression's value, rather
than the length of the string-expression's value, as demonstrated by
the following examples:
> DEFINE X CHARACTER*5 = "abc"
Input: SIZE(X)
Result: 5
Input: SIZE("abc")
Result: 3
Input: SIZE(X + "de")
Result: 7
Input: SIZE(TRUNCATE(X))
Result: 3
The following example finds the length of everyone's last name:
> DEFINE ITEMX NUM*5 = SIZE(TRUNCATE(LASTNAME))

HTH,


______________________________________________
互户互户互户互户互户互
                                              
Pat Shugart
Trinity Information Services
Farmington Hills, MI 48331
248.489.6123
248.488.9195 (fax)

>>> <jlkeepers@mmm.com> 12/27/00 11:31AM >>>


Short and sweet, does PowerHouse have a length function?  I need to setup some
logic that will do two different things depending on the length of data in the
evaluated variable.  I did a search on my on-line manuals and couldn't find
anything.  Any help would be appreicated.

Thanks,
Jeff


= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu 
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu 
This list is closed, thus to post to the list, you must be a subscriber.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.