General form, multidimensional
ARRAY statement:
ARRAY array-name {rows,cols,...} <$> <length>
<array-elements> <(initial
values)>;
array-name
names the array.
rows
specifies the number
of array elements in the row dimension.
cols
specifies the number
of array elements in the column dimension.
array-elements
names the variables
that make up the array.
initial values
specifies initial values
for the corresponding elements in the array, separated by commas or
spaces.
|
data work.wndchill (drop=column row); array WC{4,2} _temporary_ (-22,-16,-28,-22,-32,-26,-35,-29); set sasuser.flights; row=round(wspeed,5)/5; column=(round(temp,5)/5)+3; WindChill=wc{row,column}; run;
Table Representation
of the WC Array
|
|
---|---|
data work.wndchill (drop = column row); array WC{4,2} _temporary_ (-22,-16,-28,-22,-32,-26,-35,-29); set sasuser.flights; row = round(wspeed,5)/5; column = (round(temp,5)/5)+3; WindChill= wc{row,column}; run; |
|
data work.wndchill (drop = column row); array WC{4,2} _temporary_ (-22,-16,-28,-22,-32,-26,-35,-29); set sasuser.flights; row = round(wspeed,5)/5; column = (round(temp,5)/5)+3; WindChill= wc{row,column}; run;