Monday 28 December 2009

The Greatness Guide

I'm currently re-reading the humbly titled "The Greatness Guide: Powerful Secrets for Getting to World Class" by Robin Sharma. It's a nice easy read at Christmas time because each chapter is only a couple of pages long, so I can pick it up and put it down in between peeling the sprouts and fixing the Christmas tree lights (again).

It's an easy read, but that doesn't mean it's light on content. Sharma manages to offer 101 focused nuggets of advice for one's approach to life (professional and personal). Whilst the book can be summarised as yet another publication encouraging positive mental attitude and a can-do approach, Sharma's real-life illustrations manage to lift the book above several others that I've begun reading (but not finished).

Monday 21 December 2009

Round the World: Race 4 ends - SAS Consultant's Yacht Continues to Lead

Team Finland, the 68-foot racing yacht with UK-based SAS consultant Andy Philips onboard, won the Africa to Australia leg of the round-the-world race last Wednesday. Having won the first two races and achieved second place in the third, Team Finland sits comfortably at the top of the leaderboard as the crews look forward to Christmas in Oz.

A win is a win, but it was closely fought, and the second placed yacht (Spirit of Australia) was just 30 minutes behind Team Finland as they crossed the finish line. That's a very close margin after nearly 30 days of 24 hour racing across 4,700 miles of the Southern Ocean.
Race four was notable for its close finish (8 yachts finished within 7 hours of each other) and a dramatic startline crash that left two yachts with an unexpected visit to the boat builders prior to leaving port. In addition, Team Finland had a too-close-for-comfort encounter with a whale. After their encounter with a squid in race 2, Team Finland's crew will be hoping for more distant contact with wildlife on the remainder of the journey!

Clipper Round the World is a unique challenge for amateur sailors and those who've never sailed before. If you fancy braving the icy conditions of the north Pacific, the energy sapping heat of the tropics, the mountainous seas of the Southern Ocean and the frustrating calms of The Doldrums, make enquires about signing-up for Clipper 2011-12. Just visit the Take Part / Sign-Up page on the Clipper web site and get a brochure and application form. No sailing experience required, just determination, resiliance and a desire to grab a once-in-a-lifetime opportunity.

Wednesday 16 December 2009

The Duct Tape Programmer (is unit testing necessary?)

A few weeks back I noticed an interesting posting on the Joel On Software blog by Joel Spolsky. Entitled The Duct Tape Programmer, the post was a reflection from Joel after having read Peter Seibel's recent book Coders at Work. The book is an interesting read and is a collation from Seibel's interviews with 15 "all-time great" programmers. One of those programmers is Jamie Zawinski - an early member of the Netscape development team (now a nightclub owner).

In Spolsky's post, in between a few expletives(!), he highlights Zawinski's positive attitude to getting the product out of the door:
It’s great to rewrite your code and make it cleaner and by the third time it’ll actually be pretty. But that’s not the point—you’re not here to write code; you’re here to ship products
Spolsky also highlights Zawinski's more challenging approach to testing:
[Unit tests]sound great in principle. Given a leisurely development pace, that’s certainly the way to go. But when you’re looking at, ‘We’ve got to go from zero to done in six weeks,’ well, I can’t do that unless I cut something out. And what I’m going to cut out is the stuff that’s not absolutely critical. And unit tests are not critical. If there’s no unit test the customer isn’t going to complain about that.
I find the last sentence to be the most challenging. And it seems I wasn't alone. In a subsequent post on his own blog, Peter Siebel went into detail about his 15 interviewees' attitudes to unit testing (and test-driven design). It seems that attitudes were mixed.

As I suggested in my previous post entitled "Who Makes the Decisions to Cut Corners?", the customer will see the impact of reduced testing, and hence I believe that the customer is (should be) interested in unit testing. I don't suggest that your non-techie customer needs to be aware of the detail. What I say is that the development team should be able to offer a reliable estimate of how long each of the steps in the development process will take (including peer review and unit testing), and they should know the benefits of them and the business impact of reducing them. In circumstances where it is suggested that unit testing (or peer review) be reduced, the development team should be in a position to explain the business impact of making such a change, thereby empowering the customer to make a commercially-based decision.

Monday 14 December 2009

NOTE: Will You Be Listening To Enterprise Guide?

This Thursday (17th December, 6pm GMT, 1pm ET) Chris Hemedinger (senior software manager in SAS R&D) will be featured in the next installment of the SAS Talks series. Talking live, Chris will be discussing how SAS programmers can use Enterprise Guide effectively. It's a webinar presentation where you can listen to Chris talk, watch him demonstrate the software, and get your questions answered in real time.

Chris says this is a technical presentation for SAS users, not a sales pitch. Sound interesting? Registration is free! I've registered. Will I "see" you there?

Read the details in Chris's latest post on his SAS Dummy blog.

Who Makes the Decisions to Cut Corners?...

We produce SAS code to solve business problems, right? Those business problems might be a simple question about recent sales figures (resolved by a quick ad-hoc report), or they might be allied to the ability to predict manufacturing failures so proactive action can be taken to avoid the failures. Either way, there's a business benefit which has a value attached, and usually there's a timeliness associated with it too.

For any significant piece of work, you will have some kind of plan as to how you will deliver the work; and that plan will include some element of each of the following standard steps (plus effort estimates for each):
  • Requirements capture
  • Design
  • Build
  • Test
  • Deploy
Sometimes (often?!) the time and cost constraints come into conflict with the total effort indicated by the plan. In other words, the project manager says "you'll have to deliver sooner than the plan indicates, we don't have enough time/money (delete as appropriate) to do all of that". How do you resolve this apparent conflict?

Wednesday 9 December 2009

NOTE: Are You In Need Of Support?

You'll have noticed that I'm a fan of SAS 9's thin-client and visual coding tools. Indeed, my clients are fans of any technology that offers lower total cost-of-ownership (TCO) and greater self-service capabilities.

Web Report Studio (WRS) is certainly a candidate for offering lower TCO and power to the users. Chris Hemedinger (aka The SAS Dummy) used his blog this week to encourage participation in the WRS forum on the SAS support site.

In my experience, the SAS support site is a much over-looked resource at many SAS shops. For clients who have not yet benefited from being regular visitors to the SAS support site I usually highlight:

  • The support home page ( where you'll find the latest highlights
  • The R&D communities ( which are now known as the Knowledge Base / Focus Areas. These "communities" are populated with information direct from the developers at SAS. They can be your first sight into new features such as Microsoft Project data conversion macros (introduced into SAS/OR in V9.1.3 release 2), earned value macros (currently experimental), and ODS LAYOUT (much of which is pre-production in V9.2). Some areas are more active than others; the Base SAS area seems the most active, and this is somewhat explained in Paul Kent's mission statement for the Base SAS area. If you don't know Paul, he is Vice-President of R&D at SAS
  • The search box on the support home page. This offers you instant access to SAS's vast support database. Check here before you call Tech Support; someone's probably reported your problem already!
  • The SAS Bookstore ( I've said before that books are the cheapest and can be the most effective training you'll ever get. The SAS Bookstore offers a huge raft of choice (from SAS Press and other publishers)
The SAS web site contains a great deal more than the marketing content that's accessed via Use as your entry point and you'll see a whole new vista of information...

What's It All About?

Since starting this blog at the end of July, I've received many kind wishes expressing appreciation for the information that the blog provides. However, I've also had a small number who have (politely) enquired whether the eclectic mix of topics is appropriate.They ask whether the SAS-related posts sit comfortably alongside the "other stuff".

This blog is headed "SAS and software development best practice". With the possible exception of our coverage of the Clipper Round the World Race, all of this blog's posts are written in the belief that they offer constructive advice or information for SAS developers. But what is a SAS developer?

Monday 7 December 2009

NOTE: Jim Davis Jousts

Recently I highlighted a New York Times article about SAS and how its rivals are taking aim at its lucrative Business Intelligence business. I thought the article was informative and offered a balanced view.

I noticed that Jim Davis (Senior Vice President, SAS) posted an equally well-balanced response on his blog at the end of last week. Worth a read

Wednesday 2 December 2009

NOTE: Migrating to DI Studio

Users of DI Studio version 4.21 (available as part of the second release of SAS V9.2) benefit from the addition of the SAS code import wizard. In essence, you point the wizard at your code and it will convert your code to a DI job, including metadata for source and target tables. In practice, it has limitations, as you might expect of the first release of a tool with such high ambitions, but it is an impressive new capability. You can read more in the Data Integration Studio 4.21: User's Guide.

Under the covers, the code import wizard uses PROC SCAPROC. Rick Langston gave me a demo of this new PROC at this year's SGF and I was very impressed. Whilst it is used by DI Studio, you can also use it yourself, most notably for highlighting parallel processing (and, optionally, grid) opportunities in your code. SCAPROC is designed to operate in the background whilst your code is running, so you need to temporarily add a call to SCAPROC at the beginning and the end of your code. The SGF paper by Rick and Eric Thies provides a good introduction. SCAPROC was introduced with the first release of SAS V9.2.

Tuesday 1 December 2009

SAS Professionals Advent Calendar

Today is the first day of December. Time to open the first window of your advent calendar. For a SAS-themed advent calendar, visit the SASprofessionals community. You'll find an advent calendar with a beautiful picture of SAS UK's Marlow headquarters in a snow-filled setting. Each day's window reveals a special offer from SAS.

The SASprofessionals web site also contains a broad mix of groups and activities, forums and SAS-related information. It's worth joining the community...

Monday 30 November 2009

NOTE: Star Schemas and Slowly Changing Dimensions in Data Warehouses

Most data warehouses include some kind of star schema in their data model. If the dimensional data in the warehouse is likely to change over time, i.e. you have a slowly changing dimension, then you should consider this whilst designing your data model. This article provides a simple introduction to star schemas and slowly changing dimensions (SCDs). These terms are important if you are to understand some of the more powerful transforms in DI Studio.

The star schema, at its simplest, consists of a fact table surrounded by a number of associated dimension tables. The visual representation of this derives the name.

The fact table contains the facts, i.e. the central data of the warehouse (typically numeric), along with keys to the various dimension tables. A simple data model with one fact table and three dimension tables is shown below.

The keys in the dimension tables are called “Primary keys”; they uniquely identify each row. The same keys in the fact table are known as “Foreign keys”; they do not necessarily uniquely identify each row. Often the fact table will have an extra column called the “Compound Key”. This will contain a combination of the dimension keys, making it unique to each row of the fact table.

VIEWS News 48 - Newsletter ready for download

Phil Holland emailed this week to say that issue 48 of VIEWS News has gone up on the VIEWS web site, including a tip from

Phil does a great job with the newsletter and it always contains a plethora of handy hints and tips. The diary of upcoming SAS-related events is most useful too. Back-issues of the newsletter can be viewed from the SAScommunity web site.

Wednesday 25 November 2009


I just discovered that Enterprise Guide's EGP files are actually zip files. You can open them with appropriate unzip utilities and extract your code, log and listing files.

POLL RESULT: What is your preferred method for accessing the NOTE: blog?

We recently ran a poll on the blog to understand your preferred method for accessing the information contained hereabouts. The ability to vote was open to all. A mere 27 votes were cast, not a sufficient number to draw significant conclusions from (and it was open to mis-use by voting more than once). However, the results are shown below and demonstrate a large apparent preference for access by RSS feed.

Visiting the web site:   1 ( 3%)
RSS reader:             16 (59%)
Email subscription:      4 (14%)
Twitter:                 4 (14%)
Other:                   2 ( 7%)

I'm intrigued by the 2 votes for "other". What other access channels are there? Please do post a comment with your suggestions.

NOTE: used to be published as an email and was sent (free) to over 4,000 subscribers. In converting to a blog we had assuemd that there would be a preference to receive new posts via email. It seems we may have been wrong. We will use the information to reconsider our posting pattern. We currently post just twice a week in order to keep down the volume of emails. If you have any posting preferences, please let us know in a comment.

Monday 23 November 2009

NOTE: More on CAT Functions

Further to last week's post on using the CAT functions, Jack Hamilton emailed me with some further advice:

There are also problems with the CAT functions in PROC SQL. I don't remember the exact details, but I had something like this:

select catx(', ', a, b, c, d, e, f, g, h, i)
into :macrovar

If the result string exceeded a certain size, it was truncated.

In this particular case I went back to the concatenation operator.

In general, functions that return a string value can look at their destination to decide how long the result can be. In this case, there is no predefined destination length, and the function arbitrarily chose a length that was too small.
Good advice. There's no reason to avoid the CAT functions, but they do need to be used with the same degree of consideration as other string functions and you need to pay attention to lengths.

Thanks Jack

Round the World: Race 3 Ends - SAS Consultant's Yacht Leads

Team Finland, with UK-based SAS consultant Andy Philips onboard, finished second in the South America to Africa leg of the round-the-world race. Having won the first two races, their second place in the third race means they sit at the top of the leaderboard as they fettle Team Finland for the fourth race - Africa to Australia.

Race three saw some interesting variations in tactics, some very heavy weather, plus a scary man-overboard rescue on Hull & Humber.

Race four sees the crews face yet tougher seas - "should be interesting!" said Andy in his email to me last week, having arrived into port the previous night. "Loving this hot water, beer, and a floor that isn't heeled over at 30 degrees!"

Good luck, Andy!

NOTE: Rivals Take Aim

The New York Times published a balanced and thoughtful feature on SAS last Sunday. The feature gently illustrated the counterpoint between SAS's Cary employees' apparently comfortable working life and the impending onslaught on SAS's markets resulting from recent business intelligence aquisitions from heavy-hitting IT giants such as IBM, SAP and Oracle. Recommended reading... Nice slide show too, including a picture of SAS's solar farm, operational since December 2008 and with an estimated 1.7 million kilowatt-hours (kWh) annual output. There's a second solar farm planned for March 2010, with an estimated 1.9 million kilowatt-hours (kWh) annual output.

Wednesday 18 November 2009

NOTE: CATS, MISSING and CSV (Thanks For Your Help - Not!)

I warmly welcomed the CAT functions (CAT, CATS, CATT and CATX) when they were introduced in V9. They introduced a much neater style to SAS programs by eliminating the need to LEFT and TRIM our strings prior to concatenation, and the CATX function saved repeated concatenation of separator characters. I've encouraged my clients to adopt these functions (they also work faster than combinations of LEFT and TRIM), but last week I got a call from a disappointed client who was trying to use CATX and getting unpredictable results.

In addition to tracing the source of their problems, I was able to advise them on better ways of doing what they were trying to do (creating a CSV file).

NOTE: SAS Take World Programming to Court

I noticed a recent press release from SAS stating that they have "filed a lawsuit in the High Court in London against World Programming Ltd for breach of license and copyright infringement relating to the use of SAS® Learning Edition to develop and test its World Programming System software."

World Programming System is a SAS work-alike that offers a cheaper alternative to the licensing of SAS/BASE and other specific modules. It's interesting to note that SAS's case is centred around the mis-use of a SAS/LE license rather than the simple fact that WPS duplicates SAS's language. However, languages cannot be protected in law, so SAS cannot obtain copyright on the SAS language. Hence, it is vulnerable to (cheaper) providers of similar functionality, such as WPS.

World Programming Ltd says the claim has no merit and that they will defend their position. Based in Hampshire in the UK, in close vicinity to one of IBM's offices, the World Programming Ltd web site offers direct sales but no marketing partners. However, they are shown in the IBM PartnerWorld catalog as Advanced Partners. And Minequest offers indicative pricing for the product.

It'll be interesting to see how this case develops and to see if it has any subsequent impact on other tools that use or interpret the SAS language in one way or another, such as Carolina (converts SAS to Java) and ASAP (automatically produces data flow and process flow diagrams of SAS code).

Monday 16 November 2009

NOTE: SAS-L is Still Extremely Popular!

Despite competition from many sides, it's good to see that SAS-L (now synonomous with usenet newsgroup is still going strong and still providing a great service for anybody with questions or opinions about SAS.

Whilst I know that the newsgroup started in July 1993, I confess I've been unable to find when SAS-L started.

Figures from Google* show 28,000 posts per year over the last three years, possibly down to 25,000 this year. Web sites, newsletters and blogs have come and gone but the fact that SAS-L is still capable of pulling sufficient users to generate 70 posts per day shows that it remains *the* site for SAS knowledge. Google's list of top posters this month includes the names of some familiar SAS-L stalwarts including Ron Fehd, Arthur Tabachneck and Peter Crawford.

Catalist shows there are over 3,000 people subscribed through SAS-L, plus countless others accessing the information through

If you have some information to share, or you seek an answer to a problem that you've been unable to resolve yourself, try posting and be prepared to be surprised at how quickly you get a conversation and valuable help.


Radical Action for Radical Times

Back in October I mentioned some SAS publications, including Radical Action for Radical Times by my friend Jonathan Hornby. Jonathan and I go back to 1996 when he first joined SAS and joined the SAS project that I was leading. Following that he gave some cracking papers at VIEWS conferences (the UK's independant SAS user group at that time).

I most recently caught-up with Jonathan at this year's SAS Global Forum (SGF) where he was clearly energised by the process of producing his book (and the fact that all proceeds will go to childrens' cancer charities). I'm very pleased to see that Jonathan recently had the opportunity to write a post for the SAS Publications blog. In it he provides some of the process and thinking behind the book. And inspired by the writing process, Jonathan now has his own blog - Beyond Business - in which he will offer his interpretations of today's news and endeavour to extrapolate its impact upon our business futures.

Jonathan's book is about finding opportunities in times of adversity. Its message applies to all of us. We are not all in a position to directly influence executive strategies, but resonances of Jonathan's message encourage us to think clearly when defining the scope and objectives of our latest development projects. Reduced budgets mean we need to place greater focus on the value of each new feature that we deliver. And it's not simply a case of stripping-out functionality, it's also a case of looking for potentially overlooked features that provide the greater value in the current climate. Realigning development effort to focus more clearly on value-focused projects, changes and features rather than open-ended streams of continual change is crucial. Food for thought.

Wednesday 11 November 2009

NOTE: Quick Comments in Enhanced Editor and EG

I was rather late to the party in terms of realising that you can quickly comment and uncomment lines or blocks of text in the Enhanced Editor (or Enterprise Guide editor). Simply clicking ctrl-/ will insert /* at the beginning and */ at the end of each selected line. And it took me even longer to figure out that shift-ctrl-/ removes comments.

I'm sure there are many of these keyboard commands but I've never found them listed. Does anybody know where these are all listed? [See the subsequent comments for responses to my question]

NOTE: New Formats in SAS V9.2 Phase 2

Just a small thing, but worth noting nonetheless, SAS V9.2 Phase 2 introduced three numeric formats:

SIZEK - writes a numeric value in the form nK for kilobytes

SIZEKB - writes a numeric value in the form nKB for kilobytes

SIZEKMG - writes a numeric value in the form nKB for kilobytes, nMB for megabytes, or nGB for gigabytes

Useful from time-to-time I'm sure

Dashboards & Scorecards: What To Measure

My recent post on PROC GKPI and dashboards was very popular (judging by the number of hits), but I got a number of email comments suggesting I should talk more about the content rather the presentation, i.e. what to measure.

It's certainly a subject I'd like to return to, but in the meantime you could do a lot worse than to visit the blog of Wayne Eckerson (director of research and services for The Data Warehouse Institute - TDWI). In particular, check-out his recent series named Crossing The Chasm.

Tuesday 10 November 2009

NOTE: Find the Blog of Blogs at has started a page named SAS Community Planet. Visitors to this page will find a collection of weblog entries by members of the SAS community... a blog of blogs. NOTE: is included in the collection (of course!), and the collection is growing steadily.

You can subscribe to the Planet through an RSS or OPML feed, so you need never miss a post from any of your favourite sources of SAS knowledge. The Planet itself is created from the RSS feeds of the individual blogs.

The web page seems to show about one month's worth of posts, but it loads very snappily.

Great idea!

NOTE: Registration for SAS Global Forum 2010 is Open!

Registration for SAS Global Forum (SGF) in Seattle, April 11 - 14, 2010 is now open. Registration has been launched with early bird discounts and special low-priced packages.

SGF is one of the very best ways to learn about SAS software and how SAS customers are getting the best out of it. The program and agenda are still being developed, but if past years are anything to go by, the event should be top of your list of training opportunities for 2010. The conference schedule and abstracts will be available on the web on January 15th. Early bird registration discounts end March 8th.

I've submitted a paper entitled "Developing with the V-Model" that I hope to be presenting in the Applications Development stream.

Proceedings from past conferences, i.e. the papers that were presented, are some of the best SAS material that you can find. They're all available online within the SAS suport web site. They're also available alongside the proceedings of many local user groups and industry user groups at Lex Jansen's excellent library of SAS reference material - very handy for searching.

Monday 9 November 2009

POLL: What is your preferred method for accessing the NOTE: blog?

We're conducting a quick poll to better understand how you prefer to get your information from the NOTE: blog. Please take a quick moment to visit the blog home page and offer your vote.

Thanks in anticipation...

Statistical Graphics in London

"A picture can speak a thousand words" - graphics can be the best way to gain insight into a data set. The PSI (Statisticians in the Pharmaceutical Industry, no I haven’t mis-spelt the abbreviation!) have organised a one day presentation and forum to discuss and share the thinking behind creating statistical graphics as well as the methodology, tools and processes involved.

Experts in the field of statistical graphics will share their experience and ideas with the audience which will then be presented with the results of a challenge: 5 software solutions 'gurus' were tasked with presenting real-life, but perhaps unusual data sets using the best graphics their software and personal experience can produce. Take a look at the flyer to see the detailed aganda for the day. You will see that the solutions incorporate a variety of software including SAS, Stata and R.

Register before November 20th and get a reduced rate.

The meeting will take place on Tuesday 8th December at the prestigious offices of The Design Council, 34 Bow Street, London, WC2E 7DL. To register, visit the PSI's Events page, find the Graphics event (the events are listed in chronological order), and follow the Registration link. After completing the quick but somewhat clunky PSI Non-Members Registration process (it's free), make sure you mention NOTE: in the "How did you hear about this Event?" field on the form

This promises to be an interesting and thought-provoking day.

NOTE: Handy Technical Tip Sheets's daily tip last Tuesday was very good. If you've ever attended SAS Global Forum (or some other SAS events) you will have seen some really useful tip sheets being handed-out. In Tuesday's tip of the day, Little Birdie pointed-out that these are available for download from the SAS web site. Topics include ODS, the Data Step Hash Object, Regular Expressions, ODS and PROC TEMPLATE. Check them out for yourself. Highly recommended

Wednesday 4 November 2009

NOTE: SAS With Style: More thoughts on comments!

Taken from issue 2 of our (new retired) email newsletter:

Be Predictable

Using a consistent coding style is "a good thing", but there are two instances where you should not necessarily impose your chosen style. Firstly, when you are modifying some existing code that uses a different style; and secondly, there will always be exceptional cases where you can justify a deviation.

In respect of the first instance, it is not desirable to leave a module with a mixture of styles in it, so you have the choice of either changing everything to your own chosen style, or of making your changes and matching the existing style. You need to make a judgement about the amount of work involved in changing the existing code - are you just making a small change (in which case, do it in the existing style), or are you making wholesale changes (in which case, convert the lot to your new style).

In the eventuality of an exceptional case where you believe it is necessary to deviate from the chosen coding standards (the second instance), make sure you understand the reason for the particular coding standard that you would wish to break. And if you feel you are truly justified in what you are doing, make sure you document what you have done and the reasons why you did it.


Comments are a crucial part of coding, in my opinion. There are some schools of thought that eschew comments (most notably the eXtreme Programming folks) but I don't wholly subscribe to any of those.

The subject of comments is a big one. In this issue I'll focus on comments related to DO blocks since I talked about DO blocks in the last issue.

In general, comments should inform. They serve very little purpose if they merely state things about the code that are already obvious to the casual observer. In addition to informing the reader about your intent and the reasons why you chose a particular coding solution, comments can be useful to aid with the layout and structure of coding.

The layout and structure of your code helps you and others to comprehend it. One common aspect of layout and structure is indentation. I'll discuss indentation in greater detail in a future issue, but suffice it to say that most programmers indent lines of their code to indicate blocks and sub-blocks of code. The indentation is a great help in displaying the structure and flow of the code. I use paired comments with DO blocks to add to this. See the example below:

if 1 eq 0 then
do; /* Never true */
  moon = 'cheese';
  clouds = 'marshmallow';
end; /* Never true */

The DO and the END statements share the same comment. In the simple example above they don't add much to the understanding, but in complicated code with lots of sub-setted IFs and plenty of ELSEs to go with them, being able to match an END with a DO easily has great value.

On a SELECT statement, I use them thus:

select (switch);
  when (true)
  do; /* true */
  end; /* true */
end; /* select switch */

And with a DO loop, thus:

do ptr_digits = 1 to listlen(lDigits);
end; /* do over digits */

How about you? Do you do anything similar? Please leave a comment and let us know...

Listen: Be a Better Manager/Colleague

We all need a wide range of skills to be successful in the working environment (and outside of it too). Being great with SAS syntax should not be considered the sole measure of success at work. Good developers need to be skilled in (or have an appreciation of) design & architecture, testing, project management and (most importantly) communication. In this post we discuss a key communication skill that is so often lacking in our colleagues and managers: listening.

Whether we're a manager with staff who want to feel they're listened-to, or we're a developer with customers who want to feel they're listened-to, it's easy to think we're good at listening but how can we be sure. Here are a few tips for checking to see if you're a good listener:

1) Be Questioning. Do you ask as many questions as you are asked? When we're in a social setting and are asked "Hi, how are you" our natural response is to say "Fine thanks you, and how are you?". In the business setting you can do the same thing, e.g. "What's our top priority project?", "It's currently WonderWeb, do you see any other similarly high priorities?". A key tip here is to not interrupt while your question is being answered!

2) Be Seen To Act. Do you confirm that you'll act upon what you've been told? If you are questioning then you'll be given feedback; do you assure your listener that you'll act on what you've been told? "That's a great new feature suggestion, Jim. I'll put that into our backlog with a priority of 2. Okay?"

3) Focus. Does your listener feel that they are the most important person in the world to you at the time of your conversation? Maintaining eye contact (not looking over their shoulder) will assure them that you're focused on them.

4) Empathy. Do you put yourself into the shoes of the other person? Try opening yourself to the talker to the point where you can actually feel what they are feeling. Become, in small part, the person you are listening to. Standing in another's shoes and seeing the world through their eyes allows you to listen empathetically. Practice will give you the ability to see a situation simultaneously from multiple points of view.

5) Be Tough. Do you encourage tough questions, or do you try to avoid them being raised? If they're important they'll bubble to the top eventually anyway, so you might as well encourage people to raise their tough questions sooner rather than later. It gives you more time to resolve them.

You can practice your listening skills on a day-to-day basis. I've seen success with the adoption of Rosa Say's Daily 5 Minutes (D5M) working pattern. It's aimed at managers but is equally effective when used amongst peers. In a nutshell, Rosa suggests giving 5 minutes of no-agenda time to at least one member of staff or colleague per day. You can keep a simple log and rotate around the team day-by-day. It's 5 minutes for you to listen to whatever the talker wants to say. As with many successful techniques, it's simple and doesn't sound like it would be of any benefit, but I assure you it can work. Read Rosa's text and give it a try!

Rosa says in a recent blog post:
Managers who are humble are the ones other people will work hard for. A humble manager listens really well. She asks the people reporting to her what they think, and why, and what they would do about things.

You don't need to have all the answers; your job is to find them. And people who can't learn to be humble have a hard time learning where to look for those answers. Sometimes things are right there in front of them, and they don't even see.

Humble managers see with their ears, not with their eyes.
It's almost poetic!

Monday 2 November 2009

Peer Reviews / Code Reviews

We're big fans of peer reviews at We like the fact that peer reviews offer our teams the opportunity to a) apply additional quality control before we ship code out of our software factory, b) learn new techniques from each other, c) share knowledge about the applications we maintain.

In our context, a peer review is a review of an individual's work by a fellow team member.

We prefer the term Peer Review to Code Review because we need to review more than code. For starters, if we're using DI Studio, we need to review the DI jobs, not the code that it generates; and other SAS objects have no discerable code at all, e.g. information maps, but they still need to be reviewed. However "code" is a good shorthand for "all of the stuff that we make in our software factory".

If Peer Review is one of the last steps in our development process before the code ships out of the factory gates (to be passed to the testing team), we need to provide a quality stamp on all elements of what we're shipping. For us, peer review includes:
  • Be sure the code matches the Programming Guidelines. We're not overly prescriptive with our guidelines, but we have to be happy that we can all support each others code, and that means there has to be a degree of consistency in how we code
  • Be sure the code matches the Specifications. Peer review is static testing, so we don't execute the code, but we will check to see that the code appears to follow the Specs
  • Be sure the changes made (if this is an update to existing code) match the Specs for the change. The developer will provide code comparisons that show what lines have changed between the current and the new versions. You'd be surprised how often this shows us that a developer has either i) omitted a part of the change, or ii) inadvertantly introduced an unintended change
  • Be sure the developer has tested the code. The reviewer will expect to see test scripts and evidence of their successful execution
  • Be sure the code and documentation are properly stored in our Configuration Management system. We want to be confident we know what we're shipping and that we can subsequently reference it for bug fixing, etc
Doing these checks need not be too time-consuming - there's no need to re-review anything that hasn't changed - but problems found in peer review are far cheaper to fix at this stage than if they were not spotted until later (in testing, or in production).

Crucial to the success of peer reviews is the fact that the reviewer is there to learn as well as offer constructive criticism. AND let me emphasise that the criticism must be constructive!

Roy Osherove's team leadership blog recently offered some pointed advice on peer reviews. It's a good read and offers sound advice on how to introduce peer reviews into your development team.

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...


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) ;

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'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 -

We just added the BBC's 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,

Wednesday 30 September 2009

NOTE: SAS Editor Abbreviations - Create Your Own

One of the links recommended on our blog (if you scroll down far enough!) is The site describes itself as a collaborative online community for SAS® users worldwide. It forms an ever-growing repository of good SAS information.

The home page features a tip of the day from a variety of respected SAS practitioners. Yesterday's tip from Art Carpenter caught my eye:
In the Enhanced Editor it is possible to generate a standard block of code or text using a simple abbreviation. Similar to the complete-the-text feature found in MSWord and other word processors, these abbreviations are easy to create. While in the Editor go to [tools] => [add abbreviation].
Art's tip applies to the classic SAS display manager. For details on how to do the same in Enterprise Guide, and how to delete abbreviations(!), see Chris Hemedinger's SAScommunity posting.

This tip is useful for blocks of text you use repeatedly. A standard comment header block immediately comes to mind. I'm sure you can think of many others.
[This post was corrected and augmented 30-Sept-2009]

NOTE: Sparklines Improve Your Communication Abilities

In issue 18 of NOTE:, published in 2006, we talked about Edward Tufte's concept of sparklines. Since then there's been more published material on SAS and sparklines, most notably Paul OldenKamp's SGF 2008 paper entitled "An Interpretation of Sparkline Graphs and Their Creation with SAS® Software". Paul very kindly refers to issue 18 of NOTE:.

Sparklines are a tremendously rich means of communicating information in a small space. BI tools such as QlikView now include sparklines as a standard graphical object.

Here's our original article:

Edward Tufte is a world renowned expert on information graphics, i.e. the science of presenting information in a graphical format. In his recent publication named Beautiful Evidence, Mr Tufte formally introduced the concept of sparklines - small, high resolution graphics embedded in a context of words, numbers, or images. You can read large parts of a draft of the sparklines section of Mr Tufte's book in the discussion thread he started on his site in 2004.

As illustrated in Mr Tufte's book, sparklines are an extremely powerful means of communicating information. I think they're at their most powerful when used within a paragraph of text, almost as if they were a word. For example, we had some very hot weather earlier this month, but it's now reduced to a more comfortable level, as you can see: Example sparkline. The sparkline neatly conveys all of the information without interrupting the flow or layout of the text. There are many variations on the sparklines theme, all of which are discussed in Beautiful Evidence.

If you want to experiment with using sparklines, you might like to try BitWorking's sparkline generator. It's a neat and simple web-based means of getting a sparkline for your data. Alternatively, if you visit Bissantz's page on sparklines, you'll see that they produce SparkMaker (an add-in for Microsoft Office that lets you create your own sparklines in Word, Excel, PowerPoint, or HTML documents) and SparkFonts (TrueType Fonts for the character-oriented generation of sparklines). And finally, there are plenty of macros and add-ins for producing sparklines within Excel - just use your favourite search engine..

However, as a SAS practitioner, I'm sure you're thinking to yourself "I'll bet SAS/GRAPH can do sparklines neatly", and you'd be right of course! The following basic macro, and example invocation, produces a very effective sparkline: