As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.
Here are some tips for How to share your SAS knowledge with your professional network.
Arrays Made Easy
Paper 242-30 (SUGI 2005 presentation)
Steven First, President and Teresa Schudrowitz, Project Manager
Many programmers often find the thought of using arrays in their programs to be a daunting task, and as a result they often shy away from arrays in their code in favor of better-understood, but more complex solutions. A SAS array is a convenient way of temporarily identifying a group of variables for processing within a data step. Once the array has been defined the programmer is now able to perform the same tasks for a series of related variables, the array elements. Once the basics of array processing are understood arrays are a simple solution to many program scenarios.
This paper reviews the following array topics:
- Why do we need arrays?
- Basic array concepts
- Using array indexes
- One dimension arrays
- Multi-dimension arrays
- Temporary arrays
- Explicit vs. implicit subscripting
- Sorting arrays
- When to use arrays
- Common errors and misunderstandings
- Paper 242-30 - Arrays Made Easy: An Introduction to Arrays and Array Processing - Steve First and Teresa Schudrowitz, Systems Seminar Consultants, Inc., Madison, WI
- SUGI 2005 presentation: Arrays Made Easy: An Introduction to Arrays and Array Processing
- Paper by Systems Seminar Consultants
- Paper presented by Gerald Frey