8月 262016
 

ANY functionWhen I attended my first SAS conference in 2003 I was not only a first-timer, I was a first time presenter.  Needless to say I was a bit nervous.  I did not know what to expect.  Was my topic good enough for these savvy programmers and statisticians?  Well my first time was an experience I will never forget.  I gave my presentation to a relatively full room and I thought it went well enough, but I was shocked when I found out I got best paper in the section.  Ever since then I have been actively involved with SAS conferences, whether presenting or helping as a conference committee member.  After years of presenting and helping, I was asked to be the Academic Chair.  I was beyond thrilled. But I won’t let the position stop me from actually presenting some material that I have found to be very helpful at this year’s Midwest SAS Users Group.

One of the things I do in my job is I look for functions that can help make my job easier.  Once I find these functions, I like to research them and see how I can incorporate them into my programming to make it more efficient.  This year at MWSUG I will share some of my findings via an e-Poster, “When ANY Function will Just NOT Do.”

The e-Poster illustrates the concept of what I like to refer to as the “ANY and NOT Functions.” Some of the functions in this group are ANYALNUM, NOTALNUM, ANYALPHA and NOTALPHA.  Below are some snippets of code that show how some of these functions can be used to determine if there is an alphabetic character, a number or punctuation in the variable.

   /* checks for first instance of ... */
   alnum = anyalnum(value);  /* alpha-numeric */
   nalnum = notalnum(value); /* non-alphanumeric */
   alpha = anyalpha(value);  /* alphabetic */
   nalpha = notalpha(value); /* non-alphabetic */
   digit = anydigit(value);  /* digit */
   ndigit = notdigit(value); /* non-digit */ 
   punct = anypunct(value);  /* punctuation */
   npunct = notpunct(value); /* non-puncuatation */

Want to learn more about these functions?  At MWSUG this year you can see how they can be used along with other common SAS functions to extract numbers from a text string or how to build ISO 8601 dates.

So please join me at the MidWest SAS Users Group Conference October 9 – 11 at the Hyatt Regency in downtown Cincinnati, Ohio. Register now for three days of great educational opportunities, 100+ presentations, training, workshops, networking and more.

Hope to see you there!

tags: MWSUG, SAS Programmers, US Regional Conferences

MWSUG preview: When ANY Function will just NOT do! was published on SAS Users.

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)