The usual array functions in SAS are: Dim dimk hbound Hboundk LBound lboundk
The array function counts the dimensions, the upper and lower bounds of the array, and facilitates the writing of the portable program, which includes:
Dim (x) To find the number of elements in the first dimension of the array x
DIMK (x) to find the number of elements in the array x K dimension
LBound (x) to find the lower bound of the first dimension of array X
Hbound (x) to find the upper bound of the first dimension of array X
LBOUNDK (x) to find the lower bound of the array x K dimension
HBOUNDK (x) to find the upper bound of the array x K dimension
For example:
Dim (x) Calculates the number of elements in the first dimension of the array x, such as X (3,6,2), then Dim (x) =3
HBOUNDK (x) computes the upper bound of the first dimension of the array x, such as X (4,6), then HBOUNDK (x) =4
LBOUNDK (x) computes the lower bound of the first dimension of the array x, such as X (3:6,2:8), then LBOUNDK (x) =3
Common array functions in SAS