Pages

Tuesday, 30 November 2010

NOTE: Whither the WEEK Format?

My friend Eli recently wrote to tell me of a very successful 9.1 to 9.2 upgrade that was marred by just one issue. His colleague Sarah discovered that the WEEK format disappeared between 9.1 and 9.2. Sarah had been using the WEEK format to produce week numbers from dates.

With some research, Sarah managed to find an explanation in SAS usage note 34978. It tells an apparently odd tale:
For many years SAS did not have a format called WEEK. Customers often created user-defined formats with PROC FORMAT and used the format name of WEEK.

Beginning in SAS 9.1, a SAS WEEKw. format and informat were implemented but mistakenly not documented. If a customer had created a user-defined format called WEEK and attempted to use it in a program, SAS used its format called WEEK rather than the user-defined format by the same name.

Since the WEEK format and informat weren't documented anyway, the decision was made to remove them from the software beginning in SAS 9.2. This decision allows legacy code, that includes a user-defined format called WEEK, to run as expected. Now, when customers create their own format called WEEK, they will use it when they reference the WEEK format in code.

If you simply want to produce the week number for a SAS date, here is some sample code.

/* PROC FORMAT with the PICTURE statement creates a custom format. The %U directive writes the week number of the year (Sunday as the first day of the week) with no leading zero.
Today's date is written out using the WEEK format */

proc format;
  picture week '%U'(Datatype=Date);
run;

data a;
  x=today();
  put x week.;
run;
The tale seems odd because SAS took the format away completely; one might have expected them to keep it, or to offer it with a different name. However, further research shows that SAS includes several other facilities for managing week number, including new formats:

  • The WEEK function - returns the week number value in varying styles
  • WEEKU, WEEKV, and WEEKW formats and informats - reads and writes week numbers in varying styles

So, they took it away, but they didn't really! One might speculate that the WEEK format was added by a SAS staffer who wasn't aware of the other formats (and function). Anyway, if you're still on SAS V9.1 and you use the undocumented WEEK format or informat, you have been warned!

Keys to Success: People, Process, Technology

This blog is focused upon best practice for software development - typically using SAS software. It can sometimes seem like an eclectic mix of stuff, but there are an awful lot of things that contribute to making great software. But think about it, it's not just about making great software. Most of us have discovered that building a great new software tool will not always produce a successful project outcome. The saying "a fool with a tool is still a fool" springs to mind. The tool is only as good as the Processes that wrap around it. Taking it a stage further, the Processes are only as good as the People that use them.

People, Process, Technology - PPT

The most important factor is People; get this right and the rest will follow. You need to be sure that the users of your new, shiny SAS system are properly trained in all aspects of the system and have the appropriate professional skills, experience and qualifications too. For example, making the most effective use of SAS's data mining technology requires data mining skills, not just a knowledge of what the buttons and menus offer.

Beyond people, Process is crucial. You need to build and document your business processes and workflows before you get into detailed design of your technology, else you'll end-up with the tail wagging the dog! Train your people on your new processes, but be sure to involve them in the development of those processes in order to get their buy-in.

But, what is a business process? Put simply, it's a sequence of activities, started by a trigger event, and ending in a defined output and/or output, with specified steps performed by specified people/roles. Some examples would include:
Process#1: Produce new churn report
Trigger: Request from head of marketing
Output: New, scheduled churn report delivered to information delivery portal

Process#2: Credit score a potential new loan customer
Trigger: Potential customer telephones call centre
Output: Accept/reject potential customer's request for a loan
You need to define processes for a variety of aspects of your system, not just the business outputs. Make sure you have processes that cover support and administration too. Earlier this year I did a post-implementation review of a multi-million pound SAS analytics platform whose development had focused on technology and pushed people and processes to the side. The first few weeks after go-live had been very painful for users, IT and sponsors alike. Seeing the problems, everybody had pitched-in and had stabilised the system such that it could be used productively, but the post-implementation review warned that the system would not remain stable if  proper processes were not put in place quickly.

Some of the things highlighted in the post-implementation review were:

  • No data governance model, including an absence of data ownership/stewardship/custodianship, and an absence of a strategy for dealing with data quality and data loading issues
  • No change control processes for handling new groups of users, requests for new data sources, etc
  • No defined support processes specifying single points of contact for key areas

At its simplest, you can document a process as a series of steps, with one or more trigger events, with inputs and outputs for each step, with named people or job roles for each step. Swim lane diagrams are often used to document this information. Start by capturing the big steps in the process, then drill into the detail.

Ignore processes and people at your peril: the success of your project depends on them far more than the technology!

NOTE: A New SAS Blog Aggregator (SAS-X)

If you like to get all of your SAS news and views from one single place, the new SAS-X blog aggregation web site (and email and RSS feed) might just be the ideal place for you.

It's not the only SAS blog aggregator available (see sasCommunity.org Planet), but it does seem to offer some unique features, such as the ability to subscribe i) to an email feed, and ii) via Facebook.

Tuesday, 23 November 2010

NOTE: Are Your PCs Flash Enough for BI Dashboard 4.3?

Mid-November saw the release of version 4.3 of the SAS BI clients. BI Dashboard 4.3 has been adapted to use Flash technology – that means you can now use Flash interactivity to gain insight. There's a very informative SAS Global Forum paper on this subject by SAS's Michael Thomas and Gordon Hirsch; it's entitled Interactive Dashboards: Powered by Flash and the SAS Programmer.

The use of Flash makes a tremendous positive difference to the appearance and usability of SAS dashboards. However, be aware that you'll need Flash version 10 to make use of BI Dashboard 4.3. Without this pre-requisite you'll not get to use BI Dashboard 4.3! You can check your version of Flash (in Internet Explorer) by right-clicking on a Flash element on any web page, e.g. at the top of the Adobe Flash Player home page. If you have version 10 you will see "About Adobe Flash Player 10..." in the pop-up menu.

If you're planning an upgrade to version 4.3 of BI Dashboard, make sure you read Knowledge Base article 40474. SAS BI Dashboard 4.3 moved to an RIA architecture (as well as other significant back end changes), which means that there are some major usage differences between version 4.3 and version 4.2. The SAS note explains some of the differences, and provides a single point of reference to other usage notes that highlight the differences between version 4.2 and version 4.3. Despite the interface change, the core engine remained in place so the high performance of previous versions is maintained.

NOTE: Latest SAS-Related Periodicals (plus IN in macro)

The last few weeks have seen a couple of SAS-related periodicals published:
I was particularly interested to read in Views News that Amadeus offer some video podcasts:
  • Using the Macro IN Operator
  • Using Proc SCAPROC to Analyse the Inputs and Outputs of SAS Programs
  • Controlling SAS System Options with GETOPTION
  • Improving Performance with the SASFILE Statement
I watched Ann White's Using the Macro IN Operator and was introduced to the ability to use the IN operator in macro by specifying OPTIONS MINOPERATOR. It was nicely paced and very clearly presented. Recommended.

NOTE: What Would You Add or Change? SASware Ballot is Open

The annual SASware ballot is now open for business. The ballot is SAS's annual survey of customers to see what new features and enhanced features they would like. The results are traditionally presented at SAS Global Forum. Democracy in action!

Tuesday, 16 November 2010

NOTE: BI Clients V4.3 Available; SAS in Microsoft Outlook (SAS Central)

Version 4.3 of the SAS BI clients was released in the last couple of days. Read more in the What's Different (Planning for Maintenance) page on the SAS web site.

Not only did I miss SAS Global Forum this year, but I also missed the announcement of the addition of Outlook integration into the SAS Add-in for Microsoft Office 4.3. The Outlook add-in integrates with a very familiar interface using the same types of behaviors expected in the application. Reports, stored processes, and dashboards are accessible from folders, similar to e-mail, organized under a special folder called SAS Central.

At each SGF, the SAS Global Forum Technology Connection is used to unveil a year’s worth of SAS R&D’s exciting new stuff. In the 2010 session, I-Kong Fu, Business Intelligence Product Manager, presented SAS Central, a new collaborative feature of SAS BI Dashboard 4.3 that provides the ability to send dashboard reports to the Outlook inbox.

A user can now check reports including KPIs, model configuration reports and sales reports from this section. One of the key benefits is that these messages are stored on the SAS server, so they don’t take up space in your inbox. SAS Central takes advantage of Outlook’s options: When you see something that needs an action, just right click and set a meeting, send an e-mail or take advantage of many other Outlook options.

You'll find lots more detail in I-Kong Fu's paper entitled "Better Decision Making with SAS Enterprise Business Intelligence and Microsoft Outlook".

I was particularly impressed by the Gadget Pane. The Gadget Pane is a separate (optional) sub-window in Outlook that can be used to display KPIs or other high-value dashboard elements. Using the Gadget Pane allows users to monitor their key metrics whilst doing other things in Outlook.

NOTE: World Programming vs SAS - Both Sides Claim Victory!

The court case between SAS and World Programming Ltd (WPL) recently ended with both sides claiming victory. No surprise there then! Outside the court, it became a battle of the press releases...

WPL's press release told of David slaying Goliath as a 30 year monopoly was ended and the High Court saying that WPS is a lawful clone of the SAS system.

Meanwhile, SAS's press release spoke of an infringement of SAS’s copyright, WPL acting outside the scope of its license agreement, and the High Court refering the case to the European Court of Justice (ECJ).

Phil Rack (US distributor of WPS) offered his own opinions in his blog.

Perhaps the most independent view was offered by UK-based IT and e-commerce law firm Pinsent-Masons in their OUT-LAW news article.

I'll leave you to draw your own opinions.

Tuesday, 9 November 2010

NOTE: Blog Roll Additions

I've added a couple of Australasian blogs to this site's blog roll (look at the very end of the home page to find the blog roll and a list of recommended web sites).
Both are a good read.

NOTE: More Enterprise Guide Musings

Earlier in the year I offered some reflections on Enterprise Guide, having had the benefit of spending some solid time with it as a user. There are a few more things worth mentioning...

Enterprise Guide is usually introduced as a tool that encourages the use of visual coding. Visual coding has a great number of benefits, but some of the constraints are worth mentioning here. These relate to the fact that the EG visual code editor prefers to generate SQL code.
  • Each SQL node can only output one table. A single DATA step, on the other hand, can create more than one output table. This can make SQL inefficient when it needs to read an input table more than once in order to create multiple output tables - when a DATA step can read the input table just once in order to achieve the same outputs
  • Beware the Append node. Functionally it works, but it can be very inefficient when compared with PROC APPEND. Yes, that's right, the Append node doesn't use PROC APPEND, it uses SQL. And, while PROC APPEND simply adds rows to the end of an existing table (avoiding any need to re-write the existing table), EG's Append node re-writes the whole output table (existing rows plus new rows)
The reason EG prefers to generate SQL is clear - it offers a clearer, simpler means of accessing non-SAS tables, i.e. tables stored in relational databases. And, for the most part, SQL is a very efficient means of doing data access. However, the EG visual programmer needs to be aware of the code that is being generated if their resulting program is to operate efficiently. This may be particularly true of those who are familiar with Base SAS - those new to SAS coding might not make the same (false) assumptions about how things such as Append work.

Supporting the 2010 Poppy Appeal

You may have noticed that our twitter avatar is sporting a poppy this week. This is in support of the Royal British Legion's 2010 poppy appeal - commemorating those who have lost their lives in defence of their country, and providing financial, social and emotional support to those who have served in the Armed Forces, and their dependants.

We added the poppy (temporarily) using Twibbon. It's a great way to show your support, and optionally make a donation.

You can even donate via your mobile. Just text the word POPPY to 70090 to make a donation to The Royal British Legion. Texts cost £5 plus your standard network message charge; at least £4 goes directly to the Legion.

Monday, 8 November 2010

NOTE: Registration for SAS Global Forum 2011 is OPEN

Registration for SAS Global Forum 2011 opens today - November 8th.

The 2011 SAS Global Forum (SGF) will be in Las Vegas, USA, from April 4th to 7th. SGF is the SAS professionals event of the year. Packed with papers from SAS staff and fellow professionals, it's a great opportunity to listen and learn - and to get to know other SAS practitioners. If you want to keep up-to-date with SAS knowledge, Las Vegas is the place to be in April 2011.

A basic registration for the whole conference will cost $745. This is reduced for teams of 4 or more, but it goes up(!) if you register after February 28, 2011.

Make the most of your trip and book a training session too. The opening session for the conference is at 7pm on Monday 4th, but there are plenty of seminars and courses running throughout that day.

Visit the conference web site for more details. Why not get involved and offer to be a volunteer at the event?

Monday, 1 November 2010

NOTE: Multiple KPIs in HTML

One of the most popular posts of all time on NOTE: is PROC GKPI Does Dashboards. I was recently alerted to some interesting further information by a tweet from @Technolero (Fred Janssen). In the tweet, Fred said that SAS Sample 41421 describes putting multiple PROC GKPI outputs on the same HTML page using the HTMLPANEL tagset.

I'd not previously heard of the HTMLPANEL tagset but I found some background information in the R&D area of the SAS web site. In days of yore, SAS programmers used to use PROC GREPLAY to place more than one SAS graphic onto a single page; more advanced programmers may have used the DATA Step Graphics Interface (DSGI). Now it seems that HTMLPANEL is a modern way of doing this.

You can see a couple of good examples of its use on Rob Allison's excellent site. Rob offers a SAS/GRAPH imitation of Google Analytics dashboard and a SAS/GRAPH ODS htmlpanel dashboard. Sanjaya Kumar's NESUG '06 paper described usage of HTMLPANEL in nice step-by-step fashion. Recommended.

The HTMLPANEL tagset is supported in SAS 9.1 and later.

NOTE: The SAS Experts Are In Town!

If you live or work near London or Manchester then you may be interested to know that SAS are offering a free half-day training session called the SAS Experts Roadshow and it'll be in Central London on Thursday 2nd December and Manchester on Thursday 16th December. There are a limited number of places on both sessions, so I recommend you register early.

The agenda for both is pretty similar. There's a 45 minute keynote session entitled "Becoming a SAS Expert", this is then followed by a one hour session for which you must choose between three different topics:
  • The SAS Expert Channel Live - Make more of your SAS technology
  • The Programming Pundit - Comparing SAS data step code with PROC SQL
  • The Guide Guru - Easily access advanced programming techniques using SAS Enterprise Guide
Living up to its name, the event will be led by some of SAS UK's expert consultants. This is a great opportunity to improve your SAS skills and knowledge - for free!

NOTE: Enterprise Guide 4.1 Expires December 1st UNLESS...

You may recall my post this time last year in which I highlighted the fact that Enterprise Guide 4.1 will expire and stop working on December 1st 2010 unless you have applied 9 or later. Today is November 1st, so you have one month left if you haven't applied a suitable hotfix.

Without the hotfix, you will receive the following message, beginning on December 1st:
---------------------------
Error
---------------------------
This SAS Institute Inc. product expired on December 1st 2010.
---------------------------
OK
---------------------------
Applying the hot fix changes the expiration date to December 1, 2015.

EG 4.2 and 4.3 are set to expire on December 1st 2015.