IMSTAT Procedure (Data and Server Management)

UPDATE Statement

The UPDATE statement performs rowwise updates of the data in an in-memory table.

Syntax

UPDATE variable1=value1 <variable2=value2 ...> </ options>;
UPDATE DATA=libref.member-name </ options>;

Required Arguments

variable

specifies the name of the variable to update.

value

specifies the value to assign to the variable.

libref.member-name

specifies the libref and table name of a SAS data set to use for updating the in-memory table. The data set must contain the variables and values that you want to update. You can specify a _WHERE_ variable in the data set to apply as a filter to the particular set of update values. This clause in the data set augments the overall WHERE clause, if one is specified.

UPDATE Statement Options

CODE=file-reference

specifies a file reference to a SAS program to use for the row update (an update script). You can combine the specification of a SAS program through the CODE= option with the name-value pair specification or the DATA= specification for bulk updates. The updates that are specified in the name-value pair and DATE= specifications are performed first and then the update script executes on the modified row to produce the update.

Alias PGM=

NOPREPARSE

prevents the procedure from pre-parsing and pre-generating code for temporary expressions, scoring programs, and other user-written SAS statements.

When this option is specified, the user-written statements are sent to the server "as-is" and then the server attempts to generate code from it. If the server detects problems with the code, the error messages might not to be as detailed as the messages that are generated by SAS client. If you are debugging your user-written program, then you might want to pre-parse and pre-generate code in the procedure. However, if your SAS statements compile and run as you want them to, then you can specify this option to avoid the work of parsing and generating code on the SAS client.
When you specify this option in the PROC IMSTAT statement, the option applies to all statements that can generate code. You can also exclude specific statements from pre-parsing by using the NOPREPARSE option in statements that allow temporary columns or the SCORE statement.
Alias NOPREP

SAVE=table-name

saves the result table so that you can use it in other IMSTAT procedure statements like STORE, REPLAY, and FREE. The value for table-name must be unique within the scope of the procedure execution. The name of a table that has been freed with the FREE statement can be used again in subsequent SAVE= options.

TEMPEXPRESS="SAS-expressions"

TEMPEXPRESS=file-reference

specifies either a quoted string that contains the SAS expression that defines the temporary variables or a file reference to an external file with the SAS statements.

Alias TE=

TEMPNAMES=variable-name

TEMPNAMES=(variable-list)

specifies the list of temporary variables for the request. Each temporary variable must be defined through SAS statements that you supply with the TEMPEXPRESS= option.

Alias TN=

Details

Usage Notes

It is common to use the UPDATE statement with a WHERE clause. The clause filters the rows to which the updates are applied. If you are unsure about the number of rows that can be updated, use the NUMROWS statement to determine how many rows would be affected by the rowwise update.
You can update the values of ORDERBY variables, but you cannot update the value of variables that are used for constructing partition keys.
You cannot update the values of permanent computed variables. Their values are determined by the SAS program that originally defined them.

ODS Table Names

The UPDATE statement generates the following ODS table.
ODS Table Name
Description
Option
RowUpdate
Number of Rows Updated in an UPDATE LASR Analytic Server Action
Default
For information about using the ODS table with SAVE= option, see the Details section of the STORE statement.