Ron Cody is the author of several bestselling SAS books, including his latest SAS Statistics by Example. He's also one of the most highly regarded SAS experts anywhere. One could even make the case that Ron has achieved somewhat of a cult status within the SAS user community.
Whether you've gotten a chance to meet Ron or attend one of his many conference presentations (he's actually presenting at SAS Global Forum in Orlando this week), his vast knowledge and approachable communication style are readily apparent in any of his books. After viewing this week's tip from SAS Statistics by Example, I'd encourage you to read a free chapter from the book as well as visit Ron's author page to learn more about him.
The following excerpt is from SAS author Ron Cody and his book "SAS Statistics by Example" Copyright © 2011, SAS Institute Inc., Cary, North Carolina, USA. ALL RIGHTS RESERVED. (please note that results may vary depending on your version of SAS software)
A Short-Cut Method for Requesting Multiple Tables
There is a convenient way to request multiple tables using the TABLES statement. The statement:
tables A * B;creates a single table of variable A (rows) by variable B (columns).
tables A * (B C D);creates three tables—A by B, A by C, and A by D.
tables (A B) * (C D);creates four tables—A by C, A by D, B by C and B by D (in other words, every variable in the first list by every variable in the second list).
You can also request three-way tables (page by row by column) with the statement:
tables A * B * C;This statement creates tables of B by C for each separate value of A. Each one of the tables will be on a separate page.
If you're attending SAS Global Forum this week, look for Ron Cody and visit our onsite Bookstore to see his many available titles!