An Array of Challenges: Test Your SAS Skills


Author: Robert Virgile

Publisher: SAS Publishing

This collection of puzzles is designed to challenge the SAS knowledge and imagination of any SAS programmer.


Paperback (1996)


Year: 1996

ISBN: 1-55544-806-2

Pages: 173

Publisher’s list price: 26.95


  • Introduction
  • Part 1. Basics and Building Blocks
  • Part 2. Tougher Problems
  • Appendix: List of Problems by Tools and Concepts

From the Back Cover

Grab the closest writing utensil and prepare to be challenged. This brain-teasing book is designed for you to assess your programming skills through short, FUN, and puzzling SAS programming problems. No hardware required!

Test your knowledge of

  • arrays
  • DATA step flow
  • DO loops
  • FREQ, MEANS, and SUMMARY procedures
  • MERGE, OUTPUT, RETAIN, SET, Sum, and WHERE statements
  • merging data sets
  • reading raw data

The text is witty, yet the problems require concentration. The pace is yours; every few pages introduce a new problem and solution.

An array of challenges is what you’ll find in the pages of this book! To add excitement to the more advanced problems, Virgile has included the suggested time to beat in completing the problems. Good luck and have fun!

From the Introduction

The idea for this book grew out of problem-solving contests presented at NESUG and SUGI conferences. Many conference attendees commented on how much they enjoyed and learned from the contests. This book contains problems presented at previous conferences as well as a few new problems.

This book serves as a yardstick, a way of measuring your skills compared to top programmers across the country. Because many programmers with diverse skill levels have participated in problem-solving contests, I know from experience what kinds of problems a top-flight programmer can solve.

Most of the skills tested here involve fundamental concepts that are necessary for you to program at an advanced level. For example, you’ll see problems based on

  • operation of DO loops
  • lengths of variables
  • merging data sets
  • compilation versus execution time in the DATA step.

Occasionally, less common topics work their way into the picture, such as macro language or the POINT= option on a SET statement. A few problems concern the LAG function, not because it’s a common tool, but because it illustrates the flow of execution of DATA step statements. All in all, though, these problems test base SAS software programming skills. No knowledge of add-on products is required.

Reviewer’s comments

“If you think you are good, want a fun learning tool, or just want to impress your mom, this book is up to the challenge.” [from a review by Art Carpenter published in Sands of Time]