Programmer

Getting Help with SAS

SAS source code

There was some discussion in one of my SAS posts about where to find SAS help and communities. It seemed like a pretty useful topic so I thought I’d expand it a bit and make a post out of it. First, let me say I’m not the most knowledgeable since I’m more of a find-wall-bang-head type of programmer but I did my best to dig up some possible answers. If anyone has any other suggestions, feel free to leave them in the comments.

  • To start with, there’s always the official online documentation although this tends to be more for polishing something you already know how to do than starting cold.
  • Speaking of official, there’s also the official SAS forums. I didn’t know about these until I started looking around for this post so I can’t say much about them but the topics they have available seem rather specific and I can’t figure out where one would go to post a basic question.
  • Edit:There’s also the SAS Knowledge Base that has a lot of good papers and notes detailing SAS features complete with sample code and explanations. It’s really useful if you’re a learn by example type. (Thanks to Alison for pointing this one out).
  • Kelly Levoyer of SAS points out SAScommunity.org which seems like it is a little sparse but does have a surprisingly long list of SAS-related blogs.
  • The SAS company also appears to have jumped on the blogging band wagon although really only SAS Dummy looks helpful for learning SAS at the moment.
  • The only place that seem to be available for asking general question is the SAS-L email list (which I just found out is the same as the comp.soft-sys.sas Usenet group). There’s a nice paper on SAS-L etiquette (mostly do your homework first) (found via the sascommunity site).

Offline, there are also SAS user groups. I often get emails from our local one but I’ve never actually gone. The SAS company also has trainers that travel and teach quick classes. Our university stats department brought in one to teach a couple short two-day classes about statistical functions and macros. The classes were pretty good although I’m not sure how much it cost or how frequent they are. It might be worth checking on if you’re near a university.

Finally, you can also read my poor attempts at explaining SAS macro variables and SAS macros. Also, if you have any specific questions you can try asking in the comments here and if it’s not too time consuming I’ll try to lend a hand.

Programmer
SAS
Statistician

Comments (2)

Permalink

SAS Macros: Letting SAS Do the Typing

I’ve been meaning to write up a bit on using macros in SAS to complement my previous post on macro variables for quite a while. Luckily Norwegian guy reminded me about the pain of starting programming in SAS and provided me some motivation. So here’s my take on using macros in programming.

Continue Reading »

Programmer
SAS
Statistician

Comments (14)

Permalink

WP_PingPreserver

For a while, I’ve been a bit annoyed with WordPress losing pings (those automatic links on your blog when someone links to you) that should be coming to my posts. I noticed that when I or an external blog link to more than one of my posts only one ping would register in my comments. For example, if someone writes that:

Scott has written WordPress plugins to make it easier to write about code, generate monster avatars and generate unique geometric shapes for each commentor.

I would want a ping to appear on each of those linked posts, both to thank the linking blog for writing about me and to provide useful information to the reader (and to increase my comment counts). Yet WordPress only puts a ping on the first linked page.

It took me a little while to figure out why WordPress kept losing my pings since I wasn’t even sure if it was a problem on the sending or receiving end but it turns out WordPress is filtering pings because it thinks the comments are coming too fast. I’ll put the details below but if you just want to make sure all the pings intended for your blog actually reach it then here is the plugin for you.

Continue Reading »

Blogger
Programmer
Web

Comments (17)

Permalink

Creating a (Better) Fake Post with a WordPress Plugin

I was looking to create a fake page in a WordPress plugin I’m working on in my (all too limited) spare time. It may seem a little silly to try to create a fake page with a plugin but this could be useful for any plugin that will display information to the readers of the blog (outside the admin panel), like statistics, contact pages or about pages. Luckily there is a handy tutorial for creating a fake posts. But although the plugin cleverly tricks WordPress into displaying a post created dynamically by the plugin itself, WordPress is clever enough to know something is wrong and sends a 404 error before sending the plugin-created content. Although many browsers will still display the page, this is a problem for any text-based browser or if you want the page to be indexed by search engines and (for me at least) just kind of grates to know my magnificent new plugin isn’t actually performing correctly. Anyway, this happens because WP->handle_404() called by WP->main() in classes.php checks how many posts were found which, in this case, is 0 since there is no real post for the requested URL. To get around this problem, we need to make sure we trick WordPress before this function is called. Luckily we can catch WordPress immediately after it (unsuccessfully) looks for posts before any other function can figure out anything is wrong by using the the_posts filter.

Continue Reading »

Blogger
Programmer
Web

Comments (35)

Permalink

WP_CodeShield

I’ve been burned a few times in WordPress when posting something like:

This is how you make text italic: This is italic.

when I actually wanted:

This is how you make text italic: <em>This is italic.</em>

Of course it’s not too hard to remember to encode the special characters but this is WordPress and things are supposed to be easy. So I thought I would throw together a simple WordPress plugin to convert HTML special characters inside <code></code> tags. That was a few months ago and I got the plugin most of the way done and then got distracted with other things. But after reading about another person having the same annoyance, I decided I should finish the plugin.

Continue Reading »

Blogger
Programmer
Web

Comments (25)

Permalink