TEMPLATE Procedure: Creating Markup Language Tagsets
EVAL Statement
Creates or updates a user-defined variable by setting
the value of the variable to the return value of a WHERE expression.
Syntax
Required Arguments
- user-defined-variable
-
specifies the user-defined
variable that you want to create or update. A user-defined-variable has
one of the following forms:
-
$
dictionary-variable['
key']
-
-
-
- dictionary-variable
-
specifies a dictionary
variable to assign a where-expression return
value. A dictionary variable is an array that contains a list of numbers
or text strings that are identified by a key.
- ['key']
-
specifies a subscript
that contains the text that identifies where in the dictionary variable
that you want to add the return value of the WHERE expression.
Requirement:Enclose key in
quotation marks and brackets.
Tip:key is case preserving
and case sensitive.
Requirement:dictionary-variable must
be preceded by the “$” symbol.
Tip:After you create dictionary
variables, they are globally available in all events until you delete
them with the UNSET Statement .
- list-variable
-
specifies a list variable
to which to assign a where-expression return
value. A list variable is an array that contains a list of numbers
or text strings that are indexed.
- [<index>]
-
specifies a subscript
that contains a number or numeric variable.
The
index identifies
the location in the list to add the return value of the WHERE expression.
If you omit the
index and specify
only empty brackets, or if the value of
index is
greater than the highest
index number,
then the EVAL statement appends the return value to the end of the
list.
Requirements:Specify brackets [ ], even if you omit an index.
Enclose index in
brackets.
Requirement:list-variable must
be preceded by a '$' symbol.
After
you create list variables, they are globally available in all events
until you use the UNSET Statement to delete them.
- scalar variable
-
specifies a scalar
variable to which to assign a where-expression return
value.
Requirements:Scalar variables must be preceded by the '$' symbol.
After you create scalar variables, they are globally
available in all events and persist until you use the UNSET statement
to unset them.
- stream-variable
-
specifies a stream
variable to which you want to assign a where-expression return
value. A stream variable is a temporary item store that contains output.
While the stream variable
is open, all output from PUT statements is directed to the stream
variable until it is closed.
Requirement:stream-variable must
be preceded by the “$$” symbol.
- where-expression
-
any expression that
can be used in the WHERE= data set option.
Optional Argument
- event-statement-condition(s)
-
specifies one or more
conditions that must be true for the event statement to execute.
Requirement:event-statement-condition(s) must
be preceded by a slash (/).
Copyright © SAS Institute Inc. All rights reserved.