Page 64 - SAS_manual
P. 64
DO WHILE STATEMENT
Syntax:
DO while (condition);
SAS statement;
END;
This executes while condition is true. This means, if condition is true then executes SAS statement
otherwise stop. But condition will be checked only at the beginning of the loop.
Program 6.15: Output:
5.6 ARRAYS
SAS ARRAY:
A SAS array is a convenient way of temporarily identifying a group of variables for processing within a
data step. Once the array has been defined the programmer is now able to perform the same tasks for a
series of related variables, the array elements.
ArrayIs a group of similar types of variables.
Array is used to perform same task on multiple variables.
Array is temporary and used only in data step. (Temporary means it can not store data and is
present only for execution time).
Syntax:
Numeric array ::ARRAY arrayname(n) v1 v2....vn;
Char array :: ARRAY arrayname(n)$ v1 v2....vn;
Note: Arrays name must be follow SAS naming rules.
SAS HANDBOOK | VISIT:: http://nikhilanalytics.com 64