You can resize arrays
in PROC FCMP routines by calling the built-in CALL routine DYNAMIC_ARRAY.
The syntax for this CALL routine has the following form:
call dynamic_array(array, new-dim1-size, ..., new-dimN-size);
SAS passes to the DYNAMIC_ARRAY
CALL routine both the array that is to be resized and a new size for
each dimension of the array. A dynamic array enables the routine to
allocate the amount of memory that is needed, instead of having to
create an array that is large enough to handle all possible cases.
Support for dynamic
arrays is limited to PROC FCMP routines. When an array is resized,
the array is available only in the routine that resized it. It is
not possible to resize a DATA step array or to return a PROC FCMP
dynamic array to a DATA step.