CORPORATE NEWS
            CUSTOMER SPOTLIGHT
            TECHNOLOGY & SOLUTIONS
            SUPPORT & SERVICES
          ...
IDC's Analytics and Data Warehousing practice. "SAS’ long term leadership of the growing data mining software market
posit...
CORPORATE NEWS




Don’t miss this year’s User Forum taking place in London on 15 October and Cumbria on 28 October. They ...
CUSTOMER SPOTLIGHT

Morgan Stanley Identifies its Best Customers using SAS Data Warehouse and Data Mining
Capabilities

  ...
SAS Provides the Big Picture
Along with the warehouse, Morgan Stanley chose SAS Enterprise Miner to mine data and build ne...
TECHNOLOGY & SOLUTIONS

SAS Activity Based Management – Integrated Financial Intelligence for Smarter Decision
Making

   ...
SAS Enterprise Guide enables the end-users to access data locally or on SAS servers, manage the data, perform basic
analys...
In short, Service Level Management systems provide the link between IT and business, by providing reports focused on
busin...
SUPPORT & SERVICES

Customer Support Survey: Key Findings
SAS Customer Support is committed to helping you find solutions ...
•   Detailed course notes and documentation includes Dr. Cody’s book, Data Cleaning Techniques Using SAS
        Software
...
HINTS & TIPS

How can I find out the code used to define my view?

Forgotten the definitions of your views? Use the follow...
This example prints a list of the libraries currently assigned on your system.

proc print data = sashelp.vslib;
run;


Th...
This is the end of the macro.

%mend;


Step 5
Here's where we run the macro. Notice the values of our conditional paramet...
EVENTS

SAS Information Delivery Briefing – Marlow, 25 September

              Information overload is a serious issue bo...
DID YOU KNOW?

The Weird and Wonderful uses of SAS
Every now and then we hear about the non-traditional and interesting wa...
Upcoming SlideShare
Loading in …5
×

SAS Data Mining Tools Drive Growing Segment of Business ...

1,047 views
996 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,047
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
26
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

SAS Data Mining Tools Drive Growing Segment of Business ...

  1. 1. CORPORATE NEWS CUSTOMER SPOTLIGHT TECHNOLOGY & SOLUTIONS SUPPORT & SERVICES HINTS & TIPS EVENTS Welcome to the latest issue of In the Know, the bi-monthly newsletter for SAS users. It’s often been said that you can’t manage what you can’t measure. IT professionals are frequently called upon to implement solutions that measure the costs and benefits of business activities. Usually these solutions require close collaboration between business managers, consultants and IT specialists. Nowhere is this more so than with Activity Based Management (ABM), the theme of our main Technology & Solutions feature. Our second Technology & Solutions article looks at Service Level Management. In this case, the business managers and the IT managers are the same people. The new SAS Service Level Management Solution helps IT departments to align their activities more closely to business objectives and demonstrate the value they deliver. Of course, you cannot reliably measure anything without high quality data, a topic we highlight with news of a course we’re introducing later this year. We also report back the results of our customer survey - we’re doing great, but you gave us some good ideas for improving things further. Plus we have more of the Hints & Tips that you find so valuable. Finally, if you didn’t make it to seugi 21 in Vienna, we’re providing some useful links to help you catch up on what you missed and don’t forget you can now register your attendance for the UK User Forum, which are taking place in London on 15 October and Cumbria on 28 October. CORPORATE NEWS SAS Data Mining Tools Drive Growing Segment of Business Intelligence Market According to a recent IDC report* ranking vendors based on worldwide revenue for "SAS’ long term leadership business intelligence (BI) tools, SAS maintained its leadership of the data mining of the growing data mining segment with a 36 percent market share, while continuing to be one of the leaders of the software market positions overall BI tools market. the company well for the increasing importance of Worldwide revenue for the BI software tools market increased by 1.6 percent over 2001 predictive analytics in BI." with a forecasted 2002-2007 compound annual growth rate of 4.1 percent. SAS’ growth Dan Vesset, IDC's rate remained positive this year, exceeding its performance from the previous year, Analytics and Data largely as a result of the breadth of SAS’ data warehousing, business intelligence and Warehousing practice analytical software. "While continuing to invest heavily in R&D, SAS continues to provide one of the broadest portfolios of BI tools, which the company sells along with its data warehousing tools and analytic applications," said Dan Vesset, research manager for 1
  2. 2. IDC's Analytics and Data Warehousing practice. "SAS’ long term leadership of the growing data mining software market positions the company well for the increasing importance of predictive analytics in BI." IDC states that the BI market is composed of end-user query, reporting and analysis tools; data mining tools; and packaged data mart/warehouse tools. The data mining market, the fastest growing segment of the BI market per IDC, increased 5.1 percent to reach $486 million in 2002. "Forward-thinking businesses use data mining to reduce fraud, anticipate resource demand and curb customer attrition," said Jim Davis, SAS’ senior vice president and chief marketing officer. "SAS data mining technology continues to be recognised as one of the best ways to help companies unleash the hidden potential of their data. Our data mining solutions enable us to deliver predictive analytics to a large audience – from the statistician to the non-technical business user – to help them get accurate and timely intelligence to make better, faster business decisions. There’s simply no better way to help organisations gain a competitive edge and get the ROI they need to thrive in this economy." * “Worldwide Business Intelligence Forecast and Analysis, 2003-2007” (Dan Vesset, June 2003) For further information on SAS Data Mining, please visit: http://www.sas.com/technologies/analytics/datamining/ CORPORATE NEWS SAS International Users Gather in Vienna for seugi 21 Seugi 21, the premier annual international event for Enterprise Intelligence, took place on June 17-19 in Vienna, Austria. Over 2,000 delegates from business, the public sector and academic institutions attended the conference, and another 550 executives attended a parallel event at Vienna’s Schönbrunn Palace. The highlight of the conference was of course the unveiling of the new features of SAS 9. In response to customer demand SAS International increased the focus on technology, applications and implementation issues at this year’s event. Thursday, the third day of the conference, was entirely dedicated to SAS Technology Expertise with streams covering: Analytic Intelligence, Business Intelligence, Application Development, Intelligent Storage, ETLQ, Administration and Metadata and Analytical Techniques for Risk Management and Supply Chain Management. Allan Russell, SAS International’s Senior Vice President, Strategy, kicked off the presentations with an Introductory Plenary on the “Intelligence Value Chain” and followed up with a further Technology Plenary on SAS 9. There’s no substitute for attending an event like seugi. But if you missed seugi 21 in Vienna the following links will help you catch up with some of the main announcements, technology topics and themes under discussion: • Reducing the cost of data integration, increasing ROI http://www.sas.com/news/feature/18jun03/etl.html • The next step in database marketing evolution http://www.sas.com/news/feature/18jun03/mktop.html • Real-time behaviour tracking + deep analytics = improved customer profitability http://www.sas.com/news/feature/18jun03/intman.html • Providing a precise focus on profits http://www.sas.com/news/feature/18jun03/abm.html • New compliance solutions for financial services http://www.sas.com/news/feature/18jun03/fsi.html • Plenary sessions: http://support.sas.com/usergroups/seugi/seugi21/ Next year’s seugi will take place in the Danish capital, Copenhagen, and we very much hope to see you there! 2
  3. 3. CORPORATE NEWS Don’t miss this year’s User Forum taking place in London on 15 October and Cumbria on 28 October. They provide the perfect opportunity to hear current news from the world of SAS - hear about the latest SAS technology developments, exchange best practices with other users and learn how they are using SAS software. Visit our web now for the chance to apply to present your own SAS experiences, influence the content of this year’s forum and register to attend (receiving a 50% discount on the full delegate fee): http://www.sas.com/offices/europe/uk/events/userforum/index.html 3
  4. 4. CUSTOMER SPOTLIGHT Morgan Stanley Identifies its Best Customers using SAS Data Warehouse and Data Mining Capabilities Like many brokerages, Morgan Stanley could tell a lot about its 5 million accounts -- but not nearly as much about its account holders. The venerable Wall Street firm offers a myriad of products and services and -- after merging with Dean Witter in 1997 -- owns the Discover Card Co. with its 50 million cardholders. Before turning to SAS for help analyzing and organizing its data, it didn't have the capability to target its marketing efforts and offer the best fee structures to its most profitable clients. Morgan Stanley IT team "Originally when customers joined Morgan Stanley, they could open multiple accounts -- an IRA, education IRA, a regular brokerage account -- but we had no way of viewing and analyzing the client holistically," says Tom Tao, vice president and chief statistician for the CRM group. The company also had difficulty identifying its most profitable customers, and individual households could receive multiple copies of the same marketing effort. Matching Accounts to Houses Morgan Stanley's CRM data mart houses five terabytes of data from at least 30 different sources. From outside demographic and life cycle information to internal information on revenues, fees, transactions, products purchased and attitudinal information, the brokerage captures a wealth of data. To match all that data to a specific client or household, Morgan Stanley turned to SAS for data warehousing, cleansing and analytic solutions. Now the company knows that its 5 million accounts go with 2.6 million households. It can now pair that information with its products, life cycle data and attitudinal information at the individual client level. It can find how many mutual-fund-loving New Yorkers with a high level of assets available for investment respond to an education IRA offer. And it can locate the well-to-do Chicagoans near retirement age who would enjoy Morgan Stanley's preferred fee structure if they rolled over one more IRA. "We can ask questions now such as, 'What's our customer penetration for a certain Morgan Stanley mutual fund?'" Tao says. "Before SAS, I don't think anyone could get that information in a timely way. They had to go the IT department, which took much longer, because our IT team wasn't dedicated to handling analytic requests." Good Models Result From Good Data When you've got more than 30 sources of data, it's very important to make sure that they are clean -- or the models won't work. With ETLQ (ETL to the power of Q, for quality) from SAS, that data is cleansed with minimum effort -- and maximum impact. The SAS solution Morgan Stanley chose integrates the extract-transform-load process with data cleansing capabilities from DataFlux, a SAS company. DataFlux software cleanses the data and finds duplicates -- as well as multiple accounts associated with one household. "We can really vouch for this data," says Michael Strachan, vice president of client technology services at Morgan Stanley. Strachan used the data cleansing process to eliminate duplicate addresses from its Discover credit card company marketing list. "SAS ETLQ enabled us to remove some 350,000 names for a particular campaign," he says. "Not only does it save mailing costs it also avoids annoying customers with excess mail." The next step will be to use data cleansing to do the same kind of "de-duping" of its brokerage accounts. A clean data warehouse delivers advantages across various functions. "Without data cleansing, it's pretty complicated to try to standardize the address or assign a unique customer identifier. With SAS and DataFlux we can look at multiple address records and identify whether they belong to the same household or not," Tao says. He expects the de-duping to eliminate 5 to 10 percent of the company's mailing list. "It's important to keep the client happy. You don't want them receiving eight or 10 mailings." 4
  5. 5. SAS Provides the Big Picture Along with the warehouse, Morgan Stanley chose SAS Enterprise Miner to mine data and build new models. Because Enterprise Miner doesn't require a programming background, a business analyst with some statistical training can use the intuitive point-and-click graphical user interface. Combined with SAS data warehousing, the tool creates an end-to-end solution that addresses the full spectrum of knowledge discovery. From Tao's perspective, it's SAS Enterprise Miner that helps deliver a complete view of its business. One example: Morgan Stanley discovered that for a certain segment of its client base, 13 percent of the customers were generating 75 percent of the revenues. That knowledge led the firm to adjust its fee structure to encourage loyalty among that 13 percent. Tao is particularly happy with the graphical aspect of SAS Enterprise Miner. "With the decision tree, it gives you a visualized picture. For senior management it's much easier to communicate with graphs and pictures rather than with a lot of numbers." For Tao and Strachan, SAS is an eye-opener. "SAS really helps us look at the big picture," Tao says. For further information, please visit: SAS Data Warehousing: http://www.sas.com/technologies/dw/index.html ETL: http://www.sas.com/technologies/dw/etl/index.html Enterprise Miner: http://www.sas.com/technologies/analytics/datamining/miner/index.html 5
  6. 6. TECHNOLOGY & SOLUTIONS SAS Activity Based Management – Integrated Financial Intelligence for Smarter Decision Making The two critical failings of traditional cost accounting systems are: • inability to report individual product, service, customer and process costs to a reasonable level of accuracy; • inability to provide useful feedback to management for the purpose of operational control As a result, managers of complex organisations are making important decisions about pricing, product and customer mix, resource allocations and budgeting based on inaccurate and inappropriate cost and profitability information. For example, studies have shown that 20% of all customers virtually provide all the profits of a company. Another 60% break- even and the remaining 20% only reduce the bottom line. Yet many companies continue to treat all customers the same, because they do not know the true costs of servicing individual customers. What is activity-based management (ABM)? SAS Activity Based Management is a combination of consultancy and technology services designed to deliver a solution that will enable managers to get an understanding of the actual costs and profits associated with a product, customer, service or process, surfacing cause-and-effect relationships. SAS ABM enables ongoing profitability analysis, cost management initiatives, shared services management, planning and budgeting, and capacity optimisation — helping the organisation to be more efficient, productive and profitable. ABM technologies So what’s involved from a technical viewpoint? There are three key components of the ABM reporting engine. Taken together, these capabilities make SAS ABM a complete end-to-end solution. Data Management: SAS ABM integrates with existing financial and operational systems. Uniquely, SAS translates direct and indirect costs from transactional applications such as ERP and CRM into activity and process-specific costs. In the ABM arena SAS enables you to: • Capture and read data from 100-plus sources including Oracle, SAP R/3, SAP BW, DB2, SQL Server, Access, Excel and Delimited files • Perform data validation based on pre-defined business rules, and flag exceptions and errors in form of exception reporting • Convert and prepare data into a suitable structure for loading into models • Automate the capture, validation and loading of data into models Modelling: SAS provides the modelling and analytics tools required to support both strategic and operational decision-making: • Activity Based Costing, to analyse true costs: o revealing the true costs of producing and selling products o analysing the costs involved in providing shared services • Activity Based Planning, to perform scenario-based planning using the ABC methodology: o forecasting resource requirements (like people, space and equipment) o understanding the impact of introducing new products or services o understanding the impact of price changes on profitability Business Intelligence: The information generated has to be made available to business users in an easy-to-understand format and a web- enabled interface brings analysis and reporting directly to the decision-maker’s desktop. SAS capabilities in this area include: • Web-based OLAP (online analytical processing) reporting • Standard templates enabling end-users to create their own reports • Ad hoc query and reporting for more detailed investigation 6
  7. 7. SAS Enterprise Guide enables the end-users to access data locally or on SAS servers, manage the data, perform basic analyses, reports and summaries utilise high quality graphics and export or publish results to SAS servers and other Windows or server-based applications. How can you implement ABM? First, it is important to bear in mind that ABM is always a business-led project. Technology alone cannot solve the business issues mentioned above. At a strategic level, an ABM project can only succeed if the organisation’s senior business leaders are committed to the project and the aims and objectives are communicated throughout the organisation. Consultancy is then required to manage and drive the project. The organisation and the consultants must work in close partnership to choose relevant and easy cost drivers from which to build the ABM model. These costs then need to be accurately allocated: for example, how do you allocate the costs of a broad organisational function such as telemarketing to individual customers? Answering such questions is beyond the scope of this article. Suffice it to say that SAS offers unmatched domain expertise in ABM consultancy, with market-leading resources, project-management know-how, implementation experience and training. ABM in action Kimberly-Clark Europe is among the world's 500 largest companies. The company’s SAS-based ABM solution provides product and customer profitability information across a highly complex pan-European supply chain. "We wanted to look at the costs involved in our delivery and distribution cycle, which can last between two and six months, takes in warehouses in 16 countries, and serves over 18,000 customers," says Issy Aydiner, Finance Director, Supply Chain at Kimberly-Clark. "By taking data from SAP R/3 and making it subject to certain rules, models and analytical processes, we've created a simple and cost-effective solution. We can build a route-to-market and then look at each part and the costs involved. We can model 'what if?' scenarios quickly - removing certain costs to see the effect this would have.” For the full version of the Kimberly-Clark Europe success story, please visit www.sas.com/offices/europe/uk/solutions/customer_successes/kimberly_clark.html For further information on SAS ABM, please visit www.sas.com/uk/solutions/oi_abm.html Or if you would like to receive an Information Pack on SAS Activity Based Management, please visit: http://www.sas.com/offices/europe/uk/newsletter/feature/4aug_sep03/information_request_form.html TECHNOLOGY & SOLUTIONS New Release: SAS Service Level Management In an information-driven business world, IT is responsible for an increasing proportion of corporate expenditure. That means IT not only has to do a highly professional job, but also needs to show this in terms that make business sense. For example, a bank’s business leaders do not want to know how many megabytes of information are carried over its ATM network. Nor do they want to know the mean time between failures on a network link. However they are interested to know that customers can get cash when they want it and that the bank is not losing interest by having too much cash stored in the ATMs. IT departments can demonstrate their effectiveness in business terms, but this depends on manipulating information with advanced analytical technology. The good news is that you can typically do this by leveraging existing investments. A Service Level Management system must pull together data from myriad platforms and applications and convert this into easily understood information that is aligned to corporate goals. SAS is widely used for Computer Performance and Capacity Management and the same data, viewed in terms of Services, is necessary for Service Level Management. The new SAS Service Level Management Solution enables organisations to build on their existing investment in SAS, automating what for many can become a very manual process. With such a system, IT management can shift the focus away from measuring inputs and costs to measuring outputs and benefits such as Quality of Service. It can also cover external suppliers of IT services, to ensure that they are delivering value for money. Such a system enables IT management to negotiate sensible Service Level Agreements with internal customers and to monitor their fulfilment. And because it is automated, managers focus on improving services rather than spending time writing manual reports and investigating the root causes of problems. 7
  8. 8. In short, Service Level Management systems provide the link between IT and business, by providing reports focused on business needs. Service Level Management in action FöreningsSparbanken (Swedbank) is Sweden's biggest retail bank. Swedbank's offerings are complemented by Internet and telephone services together with instore banks and post offices. Consequently, FöreningsSparbanken styles itself as "Sweden's most accessible bank": a key aspect of its market proposition and one that's highly dependent on effective IT services. In this environment, SAS® IT Management Solutions are enabling the bank to track and report on its various IT systems, in particular to underpin service level agreements (SLAs) valued at US$120 million (€105 million). "SAS helps to smooth relationships between the business units and the IT department in terms of the production and maintenance of the IT services we provide." - Fredrik Runnquist, senior vice president and head of IT. For the full version of the FöreningsSparbank success story, please visit http://www.sas.com/success/swedbank.html For further information on SAS IT Management Solutions, please visit: http://www.sas.com/solutions/itsysmgmt/index.html TECHNOLOGY & SOLUTIONS SAS Enterprise Guide: New White Paper Available ‘SAS Enterprise Guide - A Roadmap’ is a new SAS Business Intelligence white paper. It focuses on the capabilities of Enterprise Guide to enable business analysts, statisticians and SAS programmers achieve their goals while increasing productivity. It also examines how users are able to access this powerful tool to quickly create simple or complex analytic reports and distribute them with greater ease. Download and view a free copy online: http://www.sas.com/offices/europe/uk/newsletter/feature/4aug_sep03/enterprise_guide.pdf 8
  9. 9. SUPPORT & SERVICES Customer Support Survey: Key Findings SAS Customer Support is committed to helping you find solutions to problems quickly and effectively, making sure that you get the best from your SAS investments. The results of our survey suggest we’re on the right track. Over a five-month period, we interviewed a random sample of users on a fortnightly basis to find out what you really thought. Specifically, we talked to customers who had used Customer Support recently to ask if you were satisfied with the way your call was handled. And the results - warts and all - were illuminating. Overall, we were delighted with what you had to say: • 95% of customers surveyed said they were happy with the service • Of these, 85% said we are better than other vendors • 78% of customers surveyed use Customer Support at least every few months with 83% of you contacting us by phone • 89% said they got straight through and on leaving a message 90% were happy with the response time • 76% rated our follow-up calls as either ‘good’ or ‘outstanding’ One unexpected finding was that most customers do not use list servers as a support resource. However, list servers are an excellent way to find things out in a proactive manner and can help you solve problems faster. For instance, the TSNEWS-L mail and file server, maintained by Technical Support, is a good way to make sure you consistently receive the latest technical details — including alert notices, hot fixes, technical support documents and announcements. You can sign-up to TSNEWS-L here: http://support.sas.com/techsup/news/tsnews.html On the negative side, a handful of customers said they couldn’t always get through to experts immediately. This is an issue we recognise. It’s worth remembering that SAS supports a huge range of technologies and solutions, which means the person you want may not always be available straight away. If this is the case, the query is passed on to another person who is also an expert. It boils down to manpower, and we are continuously looking at ways to streamline and further improve the process. Were you interviewed? If not, do you have something to add? Please e-mail newsletter@suk.sas.com For more information on SAS Customer Support, visit: http://www.sas.com/offices/europe/uk/services/cust_support.html SUPPORT & SERVICES Come clean in 2003 on our new Data Quality course! According to an independent study by KRC Research carried out in April 2003, two-thirds of European organisations say that “dirty data” adversely affects their profitability. Poor quality data seriously compromises the quality of management decision-making. It can also be bad for your company’s image and reputation. Take marketing data for example - activities based on incorrect or duplicated data can mean customer dissatisfaction as well as wasted budgets. How many of us receive badly addressed and misspelt mailings, or receive the same mailing or call more than once? According to the KRC Research study, 81% of respondents admitted that poor customer data impacts campaign profitability. The flip side is that high quality data means better decision-making, reduced costs, an improved reputation and more receptive customers – all of which can have a measurable impact on profits. Clean data is one of SAS’ core competences. We’re therefore delighted to announce a new two-day course in Data Quality that will help you tackle this issue head on. • The course is led by data cleaning expert Dr. Ron Cody • Course content includes: o Setting data quality standards and policies o Practical techniques for error removal o De-duplication o Checks for missing data o Verification 9
  10. 10. • Detailed course notes and documentation includes Dr. Cody’s book, Data Cleaning Techniques Using SAS Software Two courses are scheduled for 7-8 and 9-10 October 2003. For more information and to book online please visit www.sas.com/uk/education. SUPPORT & SERVICES SAS Education: Register for the New Brochure SAS Education continues to reflect your educational needs by producing new and updated courses, workshops and seminars. To receive your free copy of SAS Education's update brochure for courses in 2003, and the new 2004 brochure available later this year, please register your details online: http://www.sas.com/offices/europe/uk/education/brochure_request.html SUPPORT & SERVICES SAS Professional Services: Leading the Pursuit of Excellence SAS software is used to learn from the past, monitor and communicate the present, gain insight into the future and quickly react to change. But could you do more? Tell us about the issues that you face today and allow SAS Professional Services to lead you in the pursuit of excellence: http://www.sas.com/offices/europe/uk/services/survey.html 10
  11. 11. HINTS & TIPS How can I find out the code used to define my view? Forgotten the definitions of your views? Use the following syntax to find out how they are defined. Here's an example using the procedure SQL. proc sql; describe view saslibrary.viewname; quit; When using the SAS Datastep to create the view, you can also use the following syntax within a datastep to see the syntax used to create that view. data sasuser.testview / view=sasuser.testview; set sashelp.oranges; Avg_Price=sum(of price1-price2) / 2; run; data view=sasuser.testview; describe; run; Note: The above code has been tested using SAS 8.2 on the Windows operating system. HINTS & TIPS How can I make a global change to all the blank values to the actual correct value within a set of variables? There are a series of SAS system views in the SASHELP library, which contain useful information. These can be processed like any other dataset, using WHERE and IF statements to feed values back into your programs. The following views are a few of the most useful. VCATALG Library name, Member name, Member type, Object name, Object type, Object description, Date modified, Object alias. VCOLUMN Library name, Member name, Member type, Column name, Column type, Column length, Column position, Column number, Column label, Column format, Column informat, Column index type VEXTFL Fileref, Path name (fully qualified file name and path), Engine name. VMEMBER Library name, Member name, Member type, Engine name, Indexes, Path name. VOPTION Session option name, Session option setting, Option description. VSCATLG Library name, Member name. VSLIB Library name, Path name VSTABLE Library name, Member name VTABLE Library name, Member name, Member type, Dataset label, Date created, Date modified, Number of observations, Observation length, Number of variables, Type of password protection, Compression routine, Reuse space, Bufsize, Number of deleted observations, Type of indexes. VTITLE Title number, Title text. 11
  12. 12. This example prints a list of the libraries currently assigned on your system. proc print data = sashelp.vslib; run; The following example globally replaces all blank values within variables selected to another chosen value. Step 1 Sometimes you are presented with data that contains blank values for character fields. However in reality, these blank values may have a value. In the example below we create a dataset containing details of current account balances. Zero balances are currently represented with blanks, but SAS will treat these as missing values. We will use SAS views to build a macro that will replace all instances of these missing values with their 'true' values. If you have many variables that need values replacing (not just blank or character) a macro can prove to be more maintainable than tailor written SAS code. data balances; input jan03 $9. feb03 $9. mar03 $9. apr03 $9. may03 $9. jun03 $9.; cards; OverdrawnOverdrawnOverdrawnOverdrawnOverdrawnOverdrawn Credit Credit Credit Overdrawn OverdrawnCredit Overdrawn OverdrawnCredit OverdrawnOverdrawn Credit Credit ; run; proc print data=balances; run; Step 2 This is where we use a SAS view, in this instance sashelp.volumn to populate the view tmpz1_char1 (remember that views take up less space than datasets) with details of the char variable names held within the WORK.BALANCES data set. Notice in the SQL, we use uppercase letters for the library and dataset name. This is because the view creates uppercase values for the libname and memname fields. proc sql; create view tmpz1_char1 as select * from sashelp.vcolumn where libname='WORK' and memname='BALANCES' and type='char'; quit; Step 3 Having created a view containing the names of the character variables we can now use these to populate the values of our macro variables. We will be creating a number of macro variables with the prefix charz. For this example the number of macro variables will be 6, charz1-charz6. We also create a macro variable count that contains a value relating the number of macro variables generated. data _null_; set tmpz1_char1 end=eof; call symput('charz'||left(put(_n_,8.)),(trim(name))); if eof then call symput('count',put(_n_,8.)); run; Step 4 This is where we write our macro %macro testdatz (indata,outdata,replacestr,withstr); We use 4 positional parameters for this macro. The first 'indata', will be used to tell us which dataset we wish to replace the values in. The second is 'outdata' which is the name given to the resulting dataset created after the replacements have been made. The 'replacestr' parameter is the string that you would like to replace and finally 'withstr' is the character value that replaces existing values. %local i; - will be used to generate a loop data &outdata; - create resulting dataset set &indata; - access the input dataset %do i=1 %to &count; - use the count macro variable to define the number of loops if &&charz&i="&replacestr" then &&charz&i="&withstr"; - here's where we replace the values within the dataset %end; run; 12
  13. 13. This is the end of the macro. %mend; Step 5 Here's where we run the macro. Notice the values of our conditional parameters %testdatz (work.balances,work.balances1, ,Zero); Step 6 Lets print the resulting dataset work.balances1 to see the replaced values. proc print data=balances1; run; Note: The above code has been tested using SAS 8.2 on the Windows operating system. 13
  14. 14. EVENTS SAS Information Delivery Briefing – Marlow, 25 September Information overload is a serious issue both for information consumers and the IT professionals who face constantly expanding business horizons. The challenge is to unlock your corporate data: to find and distribute information to the right people in the right place at the right time. At this special briefing, business and IT managers will hear about the latest approaches to tackling information overload - both theory and reality. This includes the SAS Information Delivery Portal, SAS data enquiries and ERP exploitation. For further information, please visit: http://www.sas.com/offices/europe/uk/events/idp/index.html London, 15 October Cumbria, 28 October The annual SAS User Forum provides the perfect opportunity to hear current news from the world of SAS - hear about the latest SAS technology developments, exchange best practices with other users and learn how they are using SAS software. Our web site now offers you the chance to apply to present your SAS experiences, influence the content of this year’s forum and register to attend (receiving a 50% discount on the full delegate fee). For further information, please visit: http://www.sas.com/offices/europe/uk/events/userforum/index.html 14
  15. 15. DID YOU KNOW? The Weird and Wonderful uses of SAS Every now and then we hear about the non-traditional and interesting ways in which SAS is being used around the world. Over the years SAS software has helped to: • Ensure the quality of cranberry sauce for holiday meals • Determine the effects of dieting on middle-aged women • Manage selective breeding programs for dogs that guide the visually impaired • Preserve Australia’s Great Barrier Reef, manatees and sea turtles in Florida and albatross in the Southern Ocean around Antarctica • Optimise the Olympic training program for a world-class swimmer • Match organ donors with the most compatible recipients We look forward to hearing about more innovative uses. If you’d like to share your SAS software story with us, please email newsletter@suk.sas.com. 15

×