An Idea Exchange for SAS software and services

Comments
by Super User
on ‎09-19-2017 10:28 AM

Proc FCMP and write your own.

 

Then it will do what you intend for given strings. I see things like "count characters except for numerals" , "except punctuation", "except special characters like @ # $ % ^ (etc)".

 

Encoding and unicode may be interesting to deal with as well....

by Valued Guide
‎09-21-2017 05:51 AM - edited ‎09-21-2017 05:56 AM

As @ballardw says you could write your own with Proc FCMP however there is a problem with definition here (one I see that even the link has fallen into) and that is that strictly speaking character variables do not have missing values; they have empty strings - but how do you define an empty string? In the case of "" that is clearly empty but what about " " (single space) or any other white space character?

 

On a wider note I wouldn't say that just because we have Proc FCMP we should never ask for new inbuilt functions; An inbuilt function will always be faster than one built with Proc FCMP and while that won't be noticeable on a few thousand observations once your data moves into the millions and tens of millions of observations then it probably will be and I say that as someone who is a big fan of Proc FCMP Smiley Happy

 

In any case I understand that SAS 9.4 M5 becomes available next week so who knows, maybe CMISS will be in there!

by PROC Star
on ‎09-26-2017 08:11 PM

SAS has already decided the definition of a character missing value, in order to implement the missing() function can take character or numeric var as an argument.

 

Agree on your second point.  We should keep asking for new functions that are useful, even if they could be built with FCMP. 

Idea Statuses
Top Liked Authors