Announcing changes to the SAS Bookshelf blog

We’re numbers people here at SAS, and recently we’ve been analyzing your interests in SAS blogs. That data has helped us come to the decision to combine the SAS Bookshelf and the SAS Training Post blogs into one. We’re also giving the blog a new name -- the SAS Learning Post.

The SAS Learning Post will be a one-stop shop for tips, tutorials and practical information to help you become a better SAS users. You’ll also receive the latest news about SAS training, certification, books and events.

After today, you will no longer see new posts here on the SAS Bookshelf. But no need to worry about missing out on the latest blog. If you currently subscribe to the Bookshelf blog, you will continue to receive the latest blogs from the SAS Learning Post. If you just stumbled on this post and want to get the latest from the SAS Learning Post blog, you can subscribe here.

If you enjoyed the blogs here on the SAS Bookshelf, you’ll love what we have in store for the SAS Learning Post. See you there!

SAS Press is heading to JMP Discovery Summit

SASbooksIn a little more than two weeks, I will be in one of my favorite places, San Diego, California, recruiting potential SAS Press authors at the JMP Discovery Summit, which will be held at the beautiful Paradise Point Resort and Spa from 14 September to 17 September 2015.

I’m especially excited about attending the conference this year because it's the 25th anniversary of SAS Press, and we are offering a 25% discount on all our SAS and JMP books at the conference. We will feature a host of books for sale, all available at the discount. And as if that was not enough, we have also scheduled a book signing by Jim Grayson, Sam Gardner, and Mia Stephens, authors of our newest JMP title, Building Better Models with JMP® Pro. The signing will take place from 11:45 a.m. to 12:30 pm in the Dockside Room.

Do you have a book idea you would like to discuss? Or perhaps you know someone who should write a book. In either case, please stop by the SAS Press booth to chat. I am also interested in hearing about books you’d like to see us publish or if you are interested in serving as a technical reviewer on our books. I hope to see you there!

Exercises for Learning SAS Programming

sasbookOur new book, Exercises and Projects for The Little SAS® Book Fifth Edition, includes a variety of exercises to help people learn SAS programming. Rebecca Ottesen, Lora Delwiche and I designed this book so that it can be used either in a classroom setting or by individual readers working alone.

One of the challenges we faced in writing exercises was how to create questions that were thought-provoking and yet not too complicated for people who are just starting to learn SAS. Our goal was not only to test readers' knowledge, but to solidify that knowledge so they will remember what they learn. That's why we included different types of exercises. Multiple-choice exercises are quick and easy, open-ended short answer exercises encourage readers to think a little more deeply about the material, and then programming exercises challenge readers to apply what they have learned.

The following questions are examples of the three types of exercises found in our book. For help with these exercises, see section 4.13 "Producing Tabular Reports with PROC TABULATE" in The Little SAS® Book, Fifth Edition.

Multiple Choice

  1. For variables listed in a CLASS statement, what statistic will PROC TABULATE produce by default?

a. Sums
b. Percentages
c. Means
d. Counts

2. If you specify two dimensions in a TABLE statement in PROC TABULATE, which dimensions will you get?

a. Pages and rows
b. Pages and columns
c. Rows and columns
d. Columns and rows

Short Answer

  1. Explain what happens to observations with missing values for variables listed in a CLASS statement in PROC TABULATE. Describe an option you can use to change this default behavior.
  2. Is it possible to write a TABLE statement in PROC TABULATE that specifies a row dimension but no column dimension? Explain your answer.

Programming Exercises

  1. A friend, who has recently begun bird watching, keeps a list of birds. For each species, she records its name and three one letter codes. The codes indicate whether or not she has seen that species (S for seen, or N for not seen), the type of bird (G for game birds, S for songbirds, R for raptors, or W for waterfowl), and whether or not that species is migratory (M for migratory, or N for nonmigratory). Use the data in her list to create summary reports.

a.  Write a DATA step to read the following raw data into a SAS data set.

Bald Eagle     S R M
Barn Owl       S R M
Gambel's Quail S G N
Canada Goose   S G N
Cardinal       N S N
Common Loon    N W M
Condor         N R N
Crow           S S N
Elf Owl        N R N
Golden Eagle   N R M
Goldfinch      S S M
Magpie         S S N
Mallard        S W M
Meadowlark     N S N
Mockingbird    S S N
Osprey         N R M
Robin          S S M
Scrub Jay      S S N
Rock Ptarmigan N G N
Turkey         N G N

b. Using PROC TABLULATE, produce a report with counts that specifies rows for the type of bird and columns for whether the bird has been seen. Be sure to include an appropriate title.

c. Create user-defined formats to replace the one letter codes with formatted values for the type of bird and whether or not it has been seen. Rerun the report using the new formats.

d. Use a different procedure to produce the same counts. Then add a comment to your program describing the differences between the two reports.

We hope that you found this information helpful. Visit the book page for additional information, reviews, and a free book excerpt.

Tips on mixing Grandpa McCafferty’s cough syrup: A statistically designed experiment


Heath Rushing

This tip is from Heath Rushing, coauthor of Design and Analysis of Experiments by Douglas Montgomery: A Supplement for Using JMP®.

After a recent design of experiments (DOE) course, a student asked about experiments with dependent factors. Throughout the two days of training, we spent considerable time designing experiments to determine the effect of one or more independent factors on multiple responses. However, in her particular experiment, she was mixing three different components in a formulation. The level of each of the three components were proportions of a mixture. This is known as a mixture design.

Her ultimate goal was to determine the proportion for each of the components to optimize multiple responses. Because she could not discuss the details of the responses or components, I referred to her formulation as Grandpa McCafferty’s cough syrup. The understanding of three key concepts was needed for her experiment:

Recognize a mixture design. In most designed experiments, the factor settings are assumed to be independent of the other factor settings; one factor can be varied independently of the level of the other factors. If the factors in the experiment are components in a mixture where the factor levels are proportions (of that particular component), the mixture factor cannot be varied independently of the other factors. Because the levels of mixture factors sum to 100%, by increasing or decreasing the proportion of one, the level of at least one of the others must decrease or increase. Read More »

25 years – 25% discount at JSM, Seattle!

120084856This year, to celebrate the 25th anniversary of SAS Press, we are offering a 25% discount on all our SAS Press books at JSM (Joint Statistical Meetings). Over the last 25 years, SAS Press has published 250 books; has worked with more than 300 SAS authors and has millions of satisfied SAS users! So come and celebrate with us and get your 25% discount on one or more of our great titles.

I’m sure by now you will have heard about SAS® University Edition, which provides free access to SAS software quickly and easily for students, professors and independent learners. Bestselling author, Ron Cody has just finished his latest title, An Introduction to SAS University Edition - which does what it says on the jar -  and provides a comprehensive guide on how to get started with SAS University Edition and use it to solve problems, using the point-and-click interface of SAS Studio, and how to write your own SAS programs. Come and visit the SAS Press booth and take a look at the preview copy.

So you have the software, and know there is a great book coming soon to get you up and running, but where to get the data? Free Data Friday is a new initiative from the SAS Analytics U community starting this fall. Over a series of 12 blogs, the community will show where to get a particular data set, how to read it into SAS, at least one model or statistic showing something interesting with that data, and at least one ODS or SAS Studio graph to show the results. Read More »

Macros Tip: %INCLUDE vs. Macro Language

Robert Virgile

Robert Virgile

This SAS author tip is from Robert Virgile, author of “SAS Macro Language Magic: Discovering Advanced Techniques”.  It actually came about when a reader posted a comment on one of Virgile’s blogs. Thank you to that reader for their comment!

Technically, %INCLUDE is not part of macro language.  Yes, it begins with a percent sign, but it is still a different tool.  What they share: for some applications, %INCLUDE is an alternative to macro language.

First, let’s review a few basics.  %INCLUDE always references a file.  Two typical examples:

%include 'complete path to a file';
filename somename 'complete path to a file';
%include somename;

Read More »

Narrow miss at PharmaSUG 2015 for bestseller

Bill Benjamin’s bestseller, Exchanging Data between SAS and Microsoft Excel: Tips and Techniques to Transfer and Manage Data More Efficiently, was pipped at the post as he narrowly missed the top spot to Implementing CDISC Using SAS: An End-to-End Guide, at last month’s PharmaSUG 2015 meeting in Orlando -- by one sale!

Here's the list of the top 5 bestselling SAS books at PharmaSUG: 

  1. Implementing CDISC Using SAS: An End-to-End Guide, Chris Holland & Jack Shostak
  2. Exchanging Data between SAS and Microsoft Excel: Tips and Techniques to Transfer and Manage Data More Efficiently, William Benjamin
  3. Getting Started with the Graph Template Language in SAS: Examples, Tips, and Techniques for Creating Custom Graphs, Sanjay Matange
  4. SAS Programming in the Pharmaceutical Industry, Second Edition, Jack Shostak
  5. ODS Techniques: Tips for Enhancing Your SAS Output, Kevin D. Smith

Congratulations to Jack Shostak for appearing twice in the top five, and topping the sales together with Chris Holland! Mirroring the theme of the conference, the pharma titles did well and we should be seeing some pretty graphs and output if the other bestsellers are anything to go by.

A big thank you to all who came to visit the SAS press booth. We’re glad our exclusive SAS buttons and stickers were such a hit – please wear them with pride all you Data Divas and Data Dudes! We’ll be bringing them again to the Joint Statistics Meeting coming up in Seattle - so if you missed out in Orlando - make sure you get there early!


Inspired to write your own book for SAS? Then please contact us at

Top 10 bestselling titles at SAS Global Forum 2015


SAS Global Forum bestselling author - William E. Benjamin, Jr.

The final figures are in! This year there was a fierce battle for the top spot of the SAS Global Forum 2015 books bestseller list.

In a nail biting finish, newcomer, Exchanging Data between SAS and Microsoft Excel: Tips and Techniques to Transfer and Manage Data More Efficiently, beat off the all-time classic, The Little SAS Book: A Primer, Fifth Edition, and Art Carpenter’s latest,  Carpenter's Guide to Innovative SAS Techniques. On site sales showed a level setting but the off-site orders, using the special conference discount code, came pouring in and tipped the balance heavily in favor of Bill Benjamin’s Exchanging Data title.

Read More »

3 reasons you need the new edition of PROC TABULATE by Example

PROC_TabulateWhat prompted me to find a co-author and write a new edition of my original book on PROC TABULATE? It’s those inventive developers at SAS. They keep adding new features to make the product even better.  There are too many new features and techniques in the book to name, but these are my top three reasons why you need to check out the new content:

  1. Percentages are now much easier

When I wrote the original book, to use percentages you had to figure out the denominator definitions by yourself. That created an entire chapter of complex explanations.  Now you can use ROWPCTN, ROWPCTSUM, COLPCTN, and COLPCTSUM to do row and column percentages with ease. The new edition shows how you can use these new statistic keywords to create clear and informative tables.

  1. The Output Delivery System (ODS) has matured as a product

There are so many new ways you can use ODS today. In the original book, written based on SAS v7, ODS was in its infancy and users were just beginning to understand its power. Today, with continued development at SAS, and many creative ideas contributed by users online and at conferences, this section is greatly expanded with new ways to make your output more professional and powerful.

  1. New tricks and cheats

No matter how good the developers at SAS, the SAS user community is always one step ahead. The new version of the chapter "PROC TABULATE Tricks: How to Cheat to Create Complex Tables” is full of ways to create customized output using clever workarounds.

Visit the book page for additional information, reviews and a free book excerpt.

Macro Myth: The closest non-empty symbol table

Robert Virgile

Robert Virgile

This SAS tip is from Robert Virgile and his book “SAS Macro Language Magic: Discovering Advanced Techniques”.

We hope you find this tip useful. You can also read an excerpt from Virgile’s book.

When CALL SYMPUT creates a new macro variable, it places that variable in “the closest non-empty symbol table.”  But what does that mean?  And why does CALL SYMPUT exhibit such unusual behavior?

Read More »

  • About this blog

    I’m Maggie Miller and I’ll be providing you the latest updates about SAS books, documentation, tips and industry trends here on the SAS Bookshelf. Follow along with my talented colleagues, and guest posters as we bring the written word to life and share helpful content with our fellow SAS book enthusiasts.
  • Subscribe to this blog

    Enter your email address:

    Other subscription options

  • Archives