-
The TEMPTABLE option stores the results of the SUMMARY
statement to a temporary table. If this table is not promoted before
the QUIT statement, it is removed from memory.
-
The TABLE statement references the _TEMPLAST_ macro
variable and sets the temporary table as the active table. All statements
that follow use the temporary table.
-
The PROMOTE statement converts the temporary table
to a regular table with the name Sum_By_Country. The table is associated
with the current library through the libref, Example. The SAS log
also includes a note that indicates how to specify the libref and
table name.
-
The TABLE statement makes the table the active table
explicitly by specifying the libref and table name. The Sum_By_Country
table is not removed from memory when the IMSTAT procedure terminates.
-
All the subsequent statements that follow the TABLE
statement use the newly promoted table.
The
example does not show the use of SAS LASR Analytic Server engine
server tags. You can use server tags with the PROMOTE statement as
show in the following code sample.
proc imstat data=example.prdsale;
summary / groupby=(region) temptable;
run;
table example.&_templast_;
run;
promote sum_by_region / tag="sales";
run;
table example.sum_by_country (tag="sales"); 4
run;
quit;
As shown in the previous
example, the TAG= option is used in the PROMOTE statement. To access
the table, the TABLE statement uses the TAG= data set option.
As shown in the following
sample, the SAS log indicates the libref, table name, and server tag
to use for accessing the table.
SAS Log for the PROMOTE Statement with the TAG= Option
NOTE: The temporary table _T_BE5C2602_45A0DCB8 was successfully promoted to the
LASR Analytic Server table WORK.SUM_BY_COUNTRY. You can access this table with
the TABLE statement as table EXAMPLE.sum_by_country(tag='sales').