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!