Defining and Referencing Two-Dimensional Arrays

A Brief Overview

Multidimensional arrays can also be created.
With a two-dimensional array, two numbers separated by a comma are used to specify the array size. Think of a two-dimensional array as consisting of rows and columns. The first number corresponds to a row, and the second number corresponds to a column. However, in the PDV, the values are still just specified as columns. A two-dimensional array is useful because you can take data from a table and load it into an array. The following figure is an example of a two-dimensional array. The array has two rows and two columns.
Figure 11.5 Two-Dimensional Array

Example: Creating a Two-Dimensional Array with Initial Values

Suppose you ...

Get SAS Certified Professional Prep Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.