The World of SAS Programming

Rick Aster

I write SAS programs — and books about SAS programming -- because people want to understand what’s going on in the world around them so they can respond effectively.

Questions

People have good reasons to ask questions about the world and about the things they hope to do in it. The significance of some questions is obvious as soon as the questions are posed. How much money does the company really have? In what cases is this drug an effective treatment for this disease? How soon is the car likely to break down? Will the intended readers of this document find it easy enough to read? Other questions may draw the same degree of curiosity, even if their implications are more indirect. Is the tax on nuclear power generation high enough to cover the eventual cost of nuclear waste disposal? After a planned merger, what will happen to the prices that customers pay? Are people healthier than they used to be? Is the planet’s temperature changing, and if so, why? Answers to questions such as these may be far from obvious, but they can often be found by a careful study of the subject.

Data

Answers are more likely to be found after information on the subject has been systematically collected and recorded. Being systematic might mean using standard units of measure or following a consistent process to test for or categorize a quality. Once information has been systematically collected, encoded, and stored on a computer, it is no longer merely information; it is computer data, and you can work with it in just about any way you can imagine.

Data is generated all the time. Most comes from two kinds of sources: scientific experimentation and business processes. A typical scientific experiment repeats the same process a number of times just for the purpose of observing and recording the results. Scientists are careful about being consistent in the way they make measurements and record observations so that they can generate unbiased data. A business process has some purpose such as manufacturing a product, communicating with customers, or delivering money, products, or services. Repetition is part of the essential nature of business, and so whatever information a business process records tends to follow a pattern closely enough that it can be used as data.

Programs

After you develop computer data, there are many ways you can study and analyze it. In keeping with the principle of being careful and systematic, however, it is usually a good idea to write a program to work with the data. The program you write tells the computer what to do with the data, and running a program is often faster and more accurate than doing the same work interactively, as you might do in a spreadsheet application, for example. At the same time, the program serves as a document of what you did with the data, which you can refer to in the future if any questions come up about what was done.

Among the dozens of programming languages that are available to computer programmers, the SAS language is the one best suited to the kinds of questions I’ve described here. Computer programmers have usually found that they can write SAS programs for working with data faster than they can write equivalent programs in any other programming language. In addition, it is easier to learn the SAS language than it is to learn to write programs for working with data in another programming language, and the SAS programs are likely to contain fewer errors than those written in another language.

SAS Software

The SAS language is the general programming language at the heart of SAS software. At many business sites, it has become the predominant programming language for new business applications, largely replacing PL/I, Basic, C, and Cobol. SAS software’s high-level I/O features and its many advanced features for working with data often mean that an application can be developed with a fraction of the coding that a traditional programming language would require. At the same time, SAS’s portability means that SAS programs require surprisingly few changes to move to a different computer or operating system.

SAS is a programmable system of integrated software published by SAS Institute Inc. Millions of people around the world in business, science, government, and education use SAS software to work with data. SAS software runs on many operating systems, including Microsoft Windows, UNIX, OS/2, Mac, MVS, and VMS. Most features of SAS software operate the same way in these different operating systems. The SAS language is part of base SAS, the central product in the SAS System.

Besides the SAS language itself, SAS software includes routines for doing many of the most common things that people do with data. A SAS program can call on informats, formats, procs, and other SAS routines to do everything from interpreting data values to applying a statistical test to a set of data. Developing the same functionality in a standalone programming language such as C would require writing much more code with a much greater potential for error.

In spite of what you may frequently hear from SAS Institute about their new products and features to do whatever is trendy this year in the world of information technology, it is primarily the SAS language that accounts for the increasing popularity of SAS software around the world. In a time when people talk about "information overload," there is more of a need than ever to find answers in data without a great deal of time and effort. SAS programming is the obvious approach to take. In many cases, it is the only practical way that the necessary work can get done.

The Professional SAS Programmer

When I set out to write about SAS programming in 1988, it was because of my conviction that someone needed to cover the subject from the professional computer programmer’s point of view. I was thinking of the many people I had met who had studied several programming languages, knew a great deal about how computers worked, and were primarily doing SAS coding because, like me, they had concluded that it was the best language for the programming work they were doing. They needed more than the how-to-write-a-program approach of most writing on SAS programming; they needed more detailed knowledge of what exactly was happening when their SAS programs ran. That information would make it possible for them to write complex SAS programs, programs that went far beyond the simple and obvious applications of the SAS language, and code them correctly in the first place, without having to go through a lot of trial and error.

As commonplace as the idea of a SAS programmer is today, it is easy to forget that it was controversial at that time. SAS Institute’s documentation in the early to mid 1980s actually stated that it was incorrect to apply the word "programmer" to a person who wrote SAS programs. Even in 1990, after Rhena Seidman and I had written our book Professional SAS Programming Secrets, its premise of professional SAS programming met resistance. SAS Institute briefly considered publishing it, but they changed their minds as soon as they had a look at it. In their rejection letter, they suggested that it didn’t make sense for a book about the SAS language to be organized around programming concepts. And they weren’t the only ones. About twenty publishers turned down our book, most saying they weren’t going to be the first to try to market a book on the "new" subject we were covering.

I'm pleased to say that times have changed and professional SAS programmers get a lot of respect these days — so much so that employers can’t find enough of us to do all the work they dream up for us to do. Even though there are more SAS programmers now than there ever were, there is room for more. Fortunately, SAS programming is not that hard to learn. It is my belief that just about anyone can become a "professional SAS programmer," whether as an occupation or just a small part of the work they do in a related field. Most of my recent writing has focused on all the basic things that people need to learn along the way. It’s true that you don’t have to think like a programmer to write SAS programs — but, in my opinion at least, it makes it a whole lot easier.

Rick Aster

It is my books that have made me well-known as a SAS programming expert. Before I started to write books, though, I had already done several years of SAS programming, concentrating on such financial subjects as banking, insurance, public finance, and econometric modeling. In more recent years, my SAS consulting work has covered a wider range of subjects, including inventory management, sales forecasting, research, personnel, database management, and direct marketing. I’ve done teaching and recorded audiocassettes about SAS programming. Since 1994, I’ve become more involved in the publishing process — all the things that go on after the manuscript is finished. I feel privileged that my occupation of SAS programming has let me work in and learn about so many different fields.

Make Something Happen

SAS programming can lead you to the answers you’re looking for, and the knowledge you gain may lead in any number of different directions, which depend on who you are and what you’re trying to accomplish. Knowledge is power, and I believe that SAS’s claim to history results from the way it makes knowledge so accessible to individuals and small groups of people. This removes knowledge from the realm of bureaucratic politics and makes it more of a simple indicator of the correct action to take. Whatever your objectives are, when you shorten the distance between the objective and the plan of action, you make it more likely that the subsequent actions will actually take you toward your stated goal. In an enterprise, knowledge is no longer a divisive force, a weapon to be used by one department against another. It is now a unifying force, helping the entire company to focus on its mission and goals and the actions necessary to achieve them. This changes everything.

 O /\

Global
Statements

RICK ASTER

SAS

BOOKS

Tech | Dictionary

Download | Rastinate

SAS

Start Here

SAS Programming

News Index

Links