Definitions for Array Processing
is a temporary grouping of SAS variables that are arranged in a particular order and
identified by an array-name. The array exists only for the duration of the current
DATA step. The array-name distinguishes it from any other arrays in the same DATA
step; it is not a variable.
Note: Arrays in SAS are different from those in many other programming
languages. In SAS, an array is not a data structure. An array is just a convenient
way of temporarily identifying a group of variables.
is a method that enables you to perform the same tasks for a series of related
is a method to reference the elements of an array.
is a simple grouping of variables that, when processed, results in output that can be
represented in simple row format.
is a more complex grouping of variables that, when processed, results in output that
could have two or more dimensions, such as columns and rows.
Basic array processing involves the following steps:
• grouping variables into arrays
• selecting a current variable for an action
• repeating an action
A Conceptual View of Arrays
The following figure is a conceptual representation of two one-dimensional arrays, Misc
Figure 25.1 One-Dimensional Array
mi s c 1
MI S C
mi s c 2
mi s c 3
mi s c 4
mi s c 5
mi s c 6
mi s c 7
mi s c 8
md a y 1
md a y 2
md a y 3
md a y 4
md a y 5
md a y 6
md a y 7
566 Chapter 25 • Array Processing