Wednesday 28 October 2009

NOTE: Disappearing Tables and Secret Syntax

A client called me today with a very strange problem. They were creating work data sets named work._tor1 and work._tor2. The code was working but they couldn't see the tables in Enterprise Guide's Server List window. Were these tables being cleaned-up automatically they asked me. A bit of internet research revealed that data sets (in any library) whose names begin "_TO" are hidden by SAS because SAS's own temporary data sets are named in this fashion. So, the data sets exist, but they're not visible to the user in EG's Server List pane and in Display Manager's SAS Explorer pane.

I got confirmation of this from Wei Cheng's intriguing SUGI 29 paper entitled "Helpful Undocumented Features in SAS". The paper is a goldmine of information. I strongly caution against using any of these features in a production system, but a number of them are very useful during development, testing or debugging. These are my favourites...

PROC SQL _METHOD and _TREE

Whilst many NOTE: readers will already know this, it's always worth repeating for the benefit of those who don't. If you have a complex join in your SQL, adding the _METHOD  keyword to the PROC SQL statement will give you a listing of the order in which the joins will be evaluated. The information uses codes that Wei lists in the paper. Adding the _TREE keyword to the PROC SQL statement provides further insight into how SQL is evaulating your joins. Wei shows some example code and some example output. Highly recommended.

Groups of Options

Running PROC OPTIONS to list-off your option settings is great but tends to fill-up the log. On the other hand, I may want to see more than one option value, so using OPTION= has limited appeal. Wei points-out that we can use the GROUP= parameter. If this was undocumented when Wei wrote the paper, it's not any more and you can see the list of valid values for GROUP in the "Displaying the Settings of a Group of Options" section in the online help. Groups include PERFORMANCE, ERRORHANDLING and MACRO.

List of Engines

Perhaps of limited use, but of some curiosity, PROC NICKNAME lists all of the engines available to you. The list is quite long. Each engine is annotated with a variety of descriptive information (see Wei's paper for an example).

Monday 26 October 2009

NOTE: Enterprise Guide 4.1 Expires 2010 UNLESS...

Earlier this month I posted a warning that Enterprise Guide 4.1 (EG 4.1) will expire at the end of 2010. Chris@SAS pointed-out that the latest EG 4.1 hot fix extends its life. That's important because upgrading to EG 4.2 is not a straightforward option: EG 4.2 only works with SAS V9.2.

The fact that SAS client software (not just EG) expires was a surprise to me and will be a surprise to many other SAS customers too, so I did some more research. Here's what I found...

NOTE: The Little SAS Book(s) and more...

Over the years, Susan Slaughter and Lora Delwiche have produced a fantastic series of books for priming new users and reminding more seasoned SAS practitioners of the key elements of using SAS. Having produced the books listed below, they are now putting the finishing touches to "The Little SAS Book for Enterprise Guide 4.2". I hear it's up to their usual standard, and I feel sure it'll be valued by all who have the benefit of receiving a copy.

All of the following books are published by SAS Publishing under the SAS Press name (once called Books By Users - BBU).
  • Coming to SAS from SPSS: A Programming Approach
  • The Little SAS Book: A Primer (a classic, now in its fourth edition)
  • The Little SAS Book for Enterprise Guide 4.1
  • The Little SAS Book for Enterprise Guide 3.0
Courses can be a valuable way to learn, but they can be expensive too. When did you last read a book that made you a better SAS practitioner? Take a look through the SAS Publishing catalog, you'll be surprised at the range and depth of the topics.

Recent SAS Press releases include:
  • Radical Action for Radical Times: Expert Advice for Creating Business Opportunity in Good or Bad Economic Times, by Jonathan Hornby
  • Analyzing and Interpreting Continuous Data Using JMP: A Step-by-Step Guide, by Jose Ramirez and Brenda Ramirez
  • Output Delivery System: The Basics and Beyond, by Lauren Haworth, Cynthia L. Zender, and Michele Burlew
Whether you're looking to learn more about SAS syntax, or using SAS within your profession, or helping your organisation to make the best of the current difficult times, SAS Press has something for you.

Wednesday 21 October 2009

NOTE: SAS With Style - Make your programs readable and maintainable

Each issue of the (now-retired) NOTE: email newsletter used to feature an article named "SAS With Style". Here's the very first article in that series:

The style of your coding can be almost as important as the actual code itself. Of course, the most important aspect of any program is its ability to perform the task expected of it; but secondary to that is the simplicity with which it can be read and understood by both yourself and other programmers. Coding style covers a range of things including layout, naming, and choice of statements.

Many popular elements of style are simply common sense, and others are very much personal preference. But if you work in a development team with a number of members, you will find great benefits to be had by standardising on a common set of style elements. If style makes the code more easily readable, then a standard style makes any team member's code instantly more readable to the other team members; and new team members will get up to speed more quickly if they only have one style to get used to.

NOTE: Make Your Voice Heard With The SASware Ballot

The SASware Ballot is SAS Institute's annual software survey. All SAS software users from around the world are invited to participate. The survey is composed of a subset of the suggestions that have been submitted to SAS's Sales, Marketing, and Technical Support staff throughout the year. Let SAS know what functions, transforms, procedures and solutions you'd like added to the product suite.

This year's SASware Ballot results will be published at Next April's SAS Global Forum conference. Following the conference, the results will be posted on the SAS web site as well as in the SAS Global Forum Proceedings.

What are you waiting for?! Get voting...

Cricklers: A Modern Twist on the Crossword

I like words. Speaking them, writing them, playing with them. I like words. That's why I was pleased to find VisuWords last week.

I like crosswords. That's why we have some SAS-themed crosswords on our company web site.

And, I like Cricklers. Invented by Michael and Barbara Crick, Cricklers are a modern twist on crosswords and are specifically designed for online use. Whenever I get a chance I like to try the daily crickler. Michael and Barbara manage to prepare a new Crickler every day, based upon the day's news. It's a remarkable achievement to do that.

When you first visit the daily crickler you are presented with a beginners Crickler ("Crickler Intro"), just to get you started. Once you've mastered that, use the pull-down in the top right of the page and select the daily Crickler. The Crickler engine incorporates a ranking system, so your daily Crickler will get harder each day as you become more expert at solving them.

Have fun...

NOTE: SAS Education Open Day

SAS UK have issued an open invitation to SAS Manchester's Education Day.

Choose from three expert streams (and try your hand in the remote controlled helicopter flying competition!)
  • The 'Guide Guru' - Easily access advanced programming techniques using SAS Enterprise Guide
  • The 'Data Sorcerer' - Use SAS Data Integration Studio to work magic your ETL processes
  • The 'Console Conjurer' - Top tricks to manage your SAS environment (already fully booked!)
Register for a free day of education quickly, places are limited!

Round the World: Race 2 Ends

On day 29, race 2 of the Clipper 09-10 Round the World Yacht Race ended. The winning yacht was Team Finland with UK SAS consultant Andy Phillips onboard. After 676 hours of non stop competition, Race2 from La Rochelle to Rio de Janeiro officially ended at 12.00 GMT yesterday. Those teams that had already crossed the finish line were awarded the relevant finishing position, while the others were awarded the position based on their distance to finish as of noon. Those who are not yet alongside in Rio can now use their engines to get their quicker.

Team Finland, Spirit of Australia and Jamaica Lightning Bolt took the three podium positions.

Ending the race in this way is a standard ocean racing procedure and is called into play by race organisers who must ensure they meet the goals of the teams, the spectators and the overall event. The decision is not one that was taken lightly. In all around the world yacht races, the first priority is the safety of the crews and their boats and this is most certainly the case with the Clipper Race. Race 3 is due to start on Tuesday 27 October and it is important from the point of view of good seamanship that the teams get the opportunity to prepare themselves and their boats correctly for the next stage of the race, which will take them towards the Southern Ocean on the way to Cape Town, South Africa.

Andy's yacht won the pre-race warm-up, Race 1, and now race 2. Can Team Finland maintain their momentum in Race 3? We shall see...

Monday 19 October 2009

NOTE: Cascading Prompts in V9.2 Stored Processes

Continuing my Twitter theme today, I can say that the Twittersphere was busy last week with several mentions of SAS V9.2's introduction of cascading prompts, i.e. the ability for a user's selection from one prompt to influence the choices offered in a second. A simple example is of prompt #1 offering a list of car manufacturers and prompt #2 offering the models of car that are produced by the selected manufacturer.

This is a major enhancement, and one that will be appreciated by anybody who has struggled to achieve this functionality in earlier releases. Using prompt #2 to offer all models of car from all manufacturers regardless of the user's selection for prompt #1 has always been a big no-no for my clients.

The SAS-BI blog featured an article (heralded on Twitter by sasbi and also by technolero) titled "Cascading Prompts in SAS Stored Processes take the Cake!", and csimien tweeted a link to an SGF 2009 paper entitled "Dynamic Prompts Make Data Cascading Easy: Introducing New Features in SAS® 9.2 Prompt Framework". Both are a good read.

Global Forum Call for Papers Closes Next Week

I just finished fettling my "Developing with the V-Model" paper for SAS Global Forum (SGF) in Seattle in April, 2010.

If you're still thinking about submitting a paper yourself, it's not too late. Contributing a paper offers benefits to you, your employer and the SAS community. Submitting a paper is not hard and can be done until Monday, October 26th (you need to submit a draft by October 26th, not the final version).

Everybody has something to contribute. Don't assume that you know nothing of interest to anybody else! The Call for Papers page tells you everything you need to know, and even has a link to a page full of suggestions for paper topics. This year I've submitted a paper on "Software Development Using the V-Model".

Presenting a paper at SGF (or a local SAS user group) gives you a great opportunity to show your employers and the SAS community what you can achieve. It's also a fantastic personal development exercise that will help you hone your presentation and communication skills in addition to making you think very carefully about the detail of your topic. There have been many times where I've doubled my knowledge in a subject area because I've had to re-appraise my comprehension of the subject area as I have tried to write in a clear and detailed fashion.

Your employer will benefit from your participation because, in addition to raising awareness of your employer and presenting them as possessing knowledgable staff, you can present your paper in-house, share knowledge and encourage debate.

So, what are you waiting for?...

Twitter: Something or Nothing?

When I attended SAS Global Forum 2009 (SGF 2009) in Washington DC earlier this year I was surprised and puzzled by all of the apparent chatter about Twitter and other social media. There were posters, inserts in my conference pack, and goodness know what else, all telling me about the Crowdvine site, the Twitter hashtag, the facebook page... the list just seemed to go on and on.  I went along to David Thomas's Birds of a Feather (BOF) session on social media and learned enough to pique my interest. David is SAS's Social Media Manager (yes, that is a real job!). In the months that followed, I decided to investigate and see what Twitter in particular had to offer to me and to my company.

I use a lot of mobile phone text messages to keep in touch with family, friends and clients, but I couldn't see any benefit in a system that offered even shorter messages that would be seen by an uncontrolled collection of Twitter users of varying points of interest. I figured that the best way to find out about it was to join and follow a few people. So, I started following SAS's David Thomas plus some of my favourite celebs (like Suzi Perry and Jason Bradbury from The Gadget Show). Then I noticed that my favourite motor sport magazine (Autosport) had a twitter account, so I started following that too. After a few days I could see some patterns emerging.

David was tweeting with his abbreviated thoughts on social media plus links to recent social media articles on the web, so I was able to expand my reading around the subject of social media; Suzi and Jason were tweeting whilst filming upcoming episodes of the Gadget Show, so I was amused with precied stories of accidents that happened on set, and I got early sight of upcoming features; and Autosport tweeted every time that they added a new article to their web site, so I got the chance to see the articles earlier and I didn't need to keep checking their site just in case there were any new articles. All-in-all I was pleasantly surprised.

I had expected to be bored to death with tweets from David about congestion on his journey to work, and tweets from Suzi about her latest handbag shopping trip, and tweets from Autosport about who had what type of coffee from Starbucks that morning! Instead of which I was learning about social media, getting greater engagement with my gadget addiction, and being kept right up to date with the motor sport world.

I quickly learned that the Twitter web site was not the most useful way of utilising the Twitter service. I discovered TweetDeck for my PC and PockeTwit for my Windows Mobile phone. Both free, just like the Twitter service itself. I added a column to Tweetdeck to show me all tweets that feature the #sas hashtag - this captured all tweets about SAS software.

So, now I had a much better understanding of how Twitter could be useful a) to me and my interests, and b) to my company and its nascent blog. I've already posted details of how we constructed the blog and how we made use of TwitterFeed to automatically tweet every time we posted a message to the blog.

I subsequently found lots more interesting people and companies to follow. Some of the top twitterers in the SAS world that I follow are sasbi, cjdinger, sascommunity, susanslaughter, and saspublishing, but there are many more. And if you're into motor sport, the following three are very topical at the moment: OfficialBrawnGP, rubarrichello and The_Real_JB.

So, in summary, I've been pleasantly surprised with the value I've got from Twitter. How can you not get value from a free service?! But therein lies the conundrum. What lies ahead for Twitter? With no apparent business model, how can it continue supplying a service that makes bigger and bigger financial demands (as the expanding service demands more and more hardware to make it run) with no income stream to match it? When you have TechCrunch's Devin Coldewey questioning the purpose of Twitter's existance, you can see that Twitter has a tough road ahead of it. For my part, I hope that the powers-that-be at Twitter can figure out where the road should take them, and how best to navigate that road. Good luck to them...

Thursday 15 October 2009

From Little Acorns...

Feedburner tells us that we achieved the mini-milestone of 100 subscribers yesterday. I'd like to say a big thank you to all of you who have shown interest in the blog, especially those who have taken time to comment on our posts or email us with your thoughts.

For those interested in statistics and figures, our first post was on 22nd July this year; we have made a total of 33 posts (34 if you include this one); Sitemeter tells us that we've had a total of 635 visits to the home page (127 of which were last week alone).

Please keep visiting and keep commenting. And don't forget to encourage your colleagues to take a look and subscribe too.

Wednesday 14 October 2009

Visual Dictionary: VisuWords

I just discovered VisuWords, an online graphical dictionary. I'm loving it (but I'm easily swayed by graphical interfaces!).

It not only shows the meaning of words but it also shows relationships between words. And it looks fun too (did I mention that?!)

Have a look and give it a try. Unlike the more sophisticated-looking Visual Thesaurus, it's free. Do you know of any others like it? Write a comment and let us all know...

Round the World Update: Race 2, Day 21

We're following the progress of SAS consultant Andy Phillips as he competes aboard yacht Team Finland in the Clipper 09-10 Round The World yacht race for amateur sailors. Andy's yacht won the first race (from England to France) but times are tougher in race 2: France to Brazil. It's a much longer course, and there are hurdles along the way, such as the infamous Doldrums.

Despite the hurdles, Team Finland is leading race 2, by some distance.  You can see the boats' positions in the Viewer on the home page. The Doldrums have had a marked effect on the race with half of the field having navigated through or round them and now motoring towards Rio in Brazil, and with the other half becalmed or, in the case of the unfortunate California, not having yet reached them.

In keeping with the spirit of the event, Team Finland's crew are thinking of their fellow competitors and have offered to great California with mops and buckets in order to do California's deep clean whilst her crew take a well deserved rest (or a few beers).

Team Finland may be leading but it hasn't been an uneventful trip. Andy wrote in his diary a couple of weeks back:
Picture the scene; it's around 8pm on a balmy Monday night somewhere off the coast of the Canaries.

The sun has set and there is only moonlight to guide the way. Life on deck is subdued with only the greetings of a watch change to break the steady purring of the boat powering on.

From nowhere something leaps from the water, a shriek is then sharply followed by a cry of, "Something strange just touched my bottom!"

This was the scene last night on Team Finland that could have cost us valuable miles. Much to Eve's horror - and our amusement - she had been accosted by a randy squid! We're not sure how or why but this little sea creature leapt 2 metres into the air with unerring precision and smacked her square on the backside! She then proceeded to run away squealing, prompting even more laughter. Helming when you can't see for tears certainly makes things more interesting. Once the squid had been given a stern talking to it was later released back to the ocean.

The only low point of the day was one of our crew getting burnt by some hot water. We've two doctors on board so she was immediately taken care of and I'm glad to say is on the road to making a full recovery. Everyone else is fine and has just enjoyed a glorious sunrise over Fuerteventura. We're pushing the boat a wee bit harder to see if we can make any gains on our rivals so hopefully that Finnish flag on the race viewer will begin sneaking up further forward.

Hi to everyone back home missing you all lots.

Andy Phillips
Good luck with the remainder of race 2, Andy. We're cheering for you...

NOTE: PROC GKPI Does Dashboards

SAS has long been renowned for the flexibility and power of its graphics, but if we're honest it has never produced top quality, visually-rich, presentation graphics out of the box. V9.2's PROC GKPI changes that, big time! GKPI produces some great looking bullet graphs, traffic lights, dials, and slider bars. Can we throw away our knowledge of annotate and DSGI? Read on...

Available in 2D or 3D, it's very easy to create any of these dashboard elements. In fact, the PROC has very few parameters, so you can't go wrong! The following code will create the dial shown alongside here.

goptions reset=all device=javaimg xpixels=240 ypixels=200;

ods listing close;
ods html style=listing;

proc gkpi mode=raised;
   dial actual=.46 bounds=(0 .23 .46 .65 .79 1) /
      target=.9 nolowbound format="percent8.0"
      afont=(f="Albany AMT" height=.5cm)
      bfont=(f="Albany AMT" height=.4cm) ;
run;
quit;

ods html close;

You can see how the value and the ranges are hard-coded in the example, but they could easily be data-driven through the use of macro variables (optionally, within a macro).

You can see three styles of speedometer alongside this text. The overview section of the documentation for PROC GKPI shows examples of each type of dashboard element.

Individual dashboard elements are very nice, but a dashboard is not a dashboard unless it has a collection of elements on it in order to provide the anticipated overview and scope. So, it's important that we can combine the individual elemnets produced from GKPI into a whole dashboard.

PROC GKPI only works with DEV=JAVAIMG. We can use it to produce such as PNG files and then include them in HTML web pages. However, the fact that JAVAIMG is the only device means that GKPI does not write a GRSEG entry to a catalog; so you can't produce a bunch of dashboard items and then use PROC GREPLAY to combine them into a single image. The trick is to use annotate and PROC GSLIDE to include the image(s) into a slide, and then use PROC GREPLAY...... ANNOTATE LIVES!

Enterprise Guide 4.2 does not offer a nice visual interface to GKPI, but I'm assured that 4.3 will do so. However, as you've seen, it's pretty simple to set the right parameters and get some great graphics.

If you're one of those who believes that content and information are more important than presentation you may scoff at GKPI. However, SAS's customers have been asking for this functionality for some time, so you can't blame SAS for giving their customers what they want.

So, if you thought GKPI only stood for Gomberg Kite Productions International, home of the world's biggest kites, you now know better!

Finally, some general references...

SAS's Robert Allison offers a large variety of SAS dashboard examples (with code) on his personal web site. Note, in particular, his GKPI dashboard and the associated code that shows GKPI used with annotate.

If you're into dashboarding, you should take a look at Dashboards By Example for some great examples of clear, vivid dashboards (and some really bad ones too!). The apparently dormant Dashboard Spy was a favourite of mine too.

Stephen Few is a highly respected practitioner in the area of data visualisation. Take a look at his company web site. His blog is highly recommended (though the photo of him is somewhat questionable!).

Monday 12 October 2009

Correction: Enterprise Guide Expiry

Well, the SAS world is an exciting and dynamic place, so I shouldn't be suprised to find that the information I posted this morning on the expiry of Enterprise Guide V4.1 has changed. As you'll see in that post's comments from Chris@SAS, the deadline has been extended.

So, you can sleep easy in your bed tonight.

[Thanks for the speedy comment Chris, much appreciated]

NOTE: Enterprise Guide Expires 2010

CORRECTION: See comments from Chris@SAS

Enterprise Guide (EG) V4.1 only works with SAS V9.1; and EG V4.2 only works with SAS V9.2; and EG V4.1 will stop working in December 2010. So if you're currently on EG 4.1, you need to migrate to SAS V9.2 before December 2010. Let me explain...

SAS usage note #33359 states that SAS Enterprise Guide software has a built-in expiration date, which is generally five to six years after it has been released. The software expires on the following dates:

SAS Enterprise Guide 2.1: December 1, 2008
SAS Enterprise Guide 3.02: December 1, 2009
SAS Enterprise Guide 4.1: December 1, 2010

And SAS's Chris Hemedinger wrote in the SAS Dummy blog back in May 2008 that whilst you can use EG 4.1 with SAS 9.2 running on the same machine
  • You cannot use SAS Enterprise Guide 4.1 to connect to SAS 9.2 running on another platform or remote machine.
  • You will not be able to use SAS Enterprise Guide 4.1 to connect to SAS 9.2-based SAS Metadata Server
And Chris followed this by saying that EG 4.2 supports only SAS 9.2 and later (not V9.1 nor V8.2).

The conclusion from all of this is that by December 2010 you must have migrated to SAS 9.2 and EG 4.2, else EG will stop working. And, when you do the migration, you have to migrate your version of EG on the same day as you migrate your SAS version.

I was surprised to discover the hard-wired expiry in EG. And when you combine it with the compatibility issues between EG versions and SAS versions, you get a situation that requires early planning for the SAS 9.1 to SAS 9.2 migration. You have been warned...

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,