Substitute Values from SAS/IML Matrices

##
Substitute Values from SAS/IML Matrices

The SUBMIT statement enables you to substitute the values of a SAS/IML matrix into the statements that are submitted to the
SAS System. For example, the following program submits SAS statements that are identical to the preceding example:

YVar = "wind_kts";
XVar = "min_pressure";
submit XVar YVar;
proc reg data=Hurr CORR plots=none;
model &YVar = &XVar;
run;
endsubmit;

You can list the names of SAS/IML matrices on the SUBMIT statement and refer to the contents of those matrices inside the
SUBMIT/ENDSUBMIT block. The syntax is reminiscent of the syntax for macros: an ampersand (&) preceding an expression means
“substitute the value of the expression.” However, the substitution takes place before the SUBMIT/ENDSUBMIT block is sent to the SAS System; no macro variables are
actually created. You can substitute character values, as shown in this example, or numeric values. If `x`

is a vector, then `&x`

lists the elements of `x`

separated by spaces.

Copyright © SAS Institute Inc. All Rights Reserved.