Wednesday, 7 October 2009

Building The Blog

We thought that the techies in the NOTE: audience might be interested in knowing how we built the blog, so we assembled this (non-PowerPoint!) presentation. It shows how we have used several web-based services to provide:
  • Blogging capabilities whereby we have a decent text editor to create posts, the posts can be scheduled for automatic publication at a later date, and we can layout a coherent home page for the blog with features such as indexing, archiving, and a "cloud" of keywords
  • Automatic emailing of posts to subscribers
  • Automatic twittering (tweeting) to inform of new posts and provide links to those posts
  • Visit & subscription statistics
To see the presentation below:
  1. Click the grey Play triangle at the centre bottom of the frame
  2. Wait for the grey progress bar to complete its journey from left to right and for "Menu" or "More" to appear bottom-right
  3. Click Menu/More and select Fullscreen (unless your screen resolution and your eyesight is a lot better than mine!)
  4. Proceed through the presentation by repeatedly pressing the grey Play triangle at the centre bottom of the frame
If you have trouble with the in-stream presentation below, try using the original Prezi presentation instead.



Write a comments and let us know what you like (or dislike) about NOTE:

Recognition for the NOTE: Blog

It was nice to see recognition for NOTE: in Chris Hemedinger's SAS Dummy blog last week. Thanks Chris. We reckon your blog's pretty good too ;)

Chris is a senior manager in R&D at SAS, editor of the SAS Dummy blog (featured in our blog roll) and author of SAS for Dummies

Monday, 5 October 2009

NOTE: More About NOTE2ERR (a.k.a. Be Of Good Type)

In an earlier post I wrote of the unsupported (and largely undocumented) NOTE2ERR system and data set option. It tells SAS to treat a certain number of "minor" syntax issues as errors instead of notes. Most notably this includes automatic conversion of characters values to numeric and vice-versa.


The post sparked conversation on SAS-L and amongst SAS practitioners at many of RTSL.eu's clients. The topic is clearly one that interests and is of use to many people. Sasplumber thought NOTE2ERR was awesome (and had some nice things to say about the blog too); Lou made a good point about protecting novice SAS programmers from their mistakes rather than punishing them; Ron Fehd suggested documentation could be found if one looked hard enough (fair point); and Jack Hamilton suggested an enhancement that would offer control over which note messages turned to errors (don't hold your breath on that one, Jack!).


The post ended with the comment "why hasn't NOTE2ERR been documented and supported?" Well, we got word from a SAS insider, and this is what they told us:
Interesting question, Andy! I never knew about NOTE2ERR, but I've dug into it and here is my take on it.
Sometimes, you want to hold your DATA step code to a higher standard. You want the DATA step to run quick and clean, and have complete confidence that it did just what you intended it to do. For example, the SAS Enterprise Miner product generates scoring code that often uses DATA step: very efficient, meant for high-use situations. NOTE2ERR allows a tester to ensure that the code being generated is not only error- and warning-free, but NOTE-free.
SAS emits a note because it wants you to be aware of something that you might not be aware of, even if most of the time it's not alarm-worthy. If you don't like those kinds of surprises, NOTE2ERR helps you ferret them out.
As to why it's not documented: it was added for internal use by SAS testers. Very occasionally a customer will call with a question where NOTE2ERR comes in handy, which is how (I suspect) the news of its existence got out.
Your blog post includes good caveats. PROC IMPORT is another one that can use DATA step. SAS proc developers are pretty disciplined about using ERRORs and WARNINGs appropriately. Does the same standard apply for NOTEs? I can't say, but NOTEs probably are not designed with the idea that an end user should be alarmed about them, so NOTE2ERR use as a constant practice might not be a great idea.
There's no specific comment about it becoming a supported feature, so we can assume it won't do so any time soon. But in the meantime, as our little birdy suggests, it's handy to use in testing and debugging.

Technology Blogging - dot.life

We just added the BBC's dot.life technology blog to our blog-roll. I don't think it's ever included any comment about SAS, but the NOTE: blog is for SAS practitioners and we assume that many of our audience, like us, are into their tech and gadgets!

As you'd expect of the BBC, the blog offers a calming, respected and even-handed view of events in the tech world. For instance, the recent post on Google Wave can be summarised as offering a cautious welcome to this interesting new offering from Google. The post's comments offer a wide range of opinions and equally thoughtful views. What is your experience of Wave?

NOTE: The DATA Step Debugger

While the IT world moves from hand-typed code to visually-created, drag-and-drop code, beneath the covers there usually lurks machine-generated code that we can all recognise. And, while we await the nirvana of a visual-coding tool that offers all the power and flexibility of hand-cranked code (don't hold your breath!) we still need to create what SAS DI Studio calls User-Written Code Nodes. In other words, as I said in my recent DI Studio in V9.2 post, DI Studio is a great tool and it becomes greater with every new release, but we're still some years away from that day when we don't need to write any code ourselves.

In the meantime, we need to continue writing code, testing code, and debugging code. A key tool for use when debugging DATA steps is the DATA step debugger (DSD). I mentioned it in my 2001 paper "Debugging Made Easy Easier". I recommended that SAS programmers be on intimate terms with the DSD! At the time, my suggestion was to read Dave Riba's paper from SUGI25 - “How to Use the Data Step Debugger”.

This week I noticed a more recent paper by Russ Lavery - "An Animated Guide: The SAS® Data Step Debugger" presented at SGF 2007. Russ offers a very accessible, easily understandable and well-illustrated guide to using the DSD. Highly recommended.

DSD helps you understand the detail of what SAS does (and when) within the DATA step - you feel like you can see inside the SAS's head. It's a real education!
 
DSD is almost exclusively an interactive tool, but it can be used in batch. Dave Riba tells you how in his aforementioned paper. However, I've never found a satisfactory use for it in practice.
 
I'm conscious that this post hasn't offered any new information, it's merely pointed you to a number of existing materials that were produced in past years. I'm happy to do that; I'm happy to avoid repeating good information that's held elsewhere (and avoid plagiarism and claiming the information as my own!!); I'm happy to provide a channel that makes SAS practitioners aware of this excellent material. I hope you agree that this, and other similar styled posts, have value. Share your thoughts with a comment...

[Yes, I know DI Studio is actually called DI Server these days, but spare me a thought - I've only just got used to calling it DI Studio rather than Warehouse Administrator]

Thursday, 1 October 2009

Drawing Pictures - Communications

Being a successful SAS developer means more than just writing great code. You need to be able to communicate your ideas and solutions to users and colleagues. The most commonly available writing tool is Microsoft Word. For those that use Word, there is a great drawing tool within it, but it's a hidden secret for many.

You may have dabbled with adding a shape or two, but the secret to producing complex diagrams in Word is to create a drawing canvas that the text will wrap around and allow your individual shapes in the drawing to be grouped together.
If you use Word 2003, you can add a diagram to your text by selecting Insert / Picture / New Drawing. For Word 2007, you need to select Insert / Shapes / New Drawing Canvas. By inserting a canvas, you have a rectangular area in whihc to create your diagram without worry that the individual shapes might be split-up later because you've added text to your document.

So, what shapes shall we use for our diagram? Well,