Google SAS Search

Add to Google

Monday, August 29, 2005

Function WishList

I am looking for ideas for functions that you would like in SAS but currently do not exist. I have a couple of ideas such as:

Count the number of words in a string (or items in a list).

How about a function to quote the words in a character string?

A function to determine if a number is prime or not?

Would you like a function that returns an MD5 hash from its input?

And I looked through a couple of the SASWARE ballots and found some contenders.
Such as, provide a function that returns the ordinal of a word in a string, such as
WORDINDEX("abc de def", "def")=3

Do you have any other ideas? If so, please let me know.

1 comment:

  1. Doesn't QUOTE(argument) get the job done?

    Or if you want each individual word in a string quoted, why not just use old-fashioned TRANWRD

    length value $ whatever it used to be plus two
    string='"' || TRIMN(string) || '"';
    string=TRANWRD(string,' ','" "')

    ReplyDelete