IMSTAT Procedure

STORE Statement

The STORE statement enables you to assign the contents of previously saved tables to macro variables. You can reuse the results from one statement as input for subsequent statements in the same IMSTAT procedure.

Syntax

STORE table-name(row <,> column) = macro-variable-name;
STORE table-name<[table-number]>(row <,> column) = macro-variable-name;

Required Arguments

macro-variable-name

specifies the name of a macro variable to use for storing the value.

table-name

specifies the saved result table to use.

row

column

specifies the row number and column number to access. These values are identified by the row and column of the table as it appears in the default output or with the REPLAY statement. Be aware that hidden columns that might appear in an output data set when an ODS table is converted to a SAS data set are not counted.

Optional Argument

[table-number]

specifies the table to use for accessing multi-part tables. In the following example, the HISTOGRAM statement generates one histogram table for the Cylinders variable and a second for the EngineSize variable. The two histogram tables are stored in the temporary HistTab table. In order to access the second histogram table, the [2] is used. If you do not specify a table-number, the first table is used.

Example
proc imstat data=mylasr.cars(tag=sashelp);;
    histogram Cylinders EngineSize / save=HistTab;
    store HistTab[2](2,6) = Engsz_Pct;
quit;
%put &Engsz_Pct;