Script Syntax
A command eval script (CES) uses a specific syntax to manipulate data in a collection of datasets. Refer to the component documentation for the SDDTools package.
Commands available in CES and their syntax are described in the component documentation for the commandeval package. The syntax is based on the syntax used to define guards (refer to the component documentation for the guardeval package).
The basic elements of the scripting language are:
-
ListSpec, which identifies a variable in a dataset.
-
ParamSpec, which identifies a parameter within a variable (a ListSpec plus an index).
-
TemplateString, which is a string that can include a ParamSpec.
Some examples of ListSpec are:
Some examples of ParamSpec are:
As an example, suppose the following is a TemplateString:
Hello I am <firstName> <lastName>.
If <firstName> contains 'Bill' and <lastName> contains 'Rogers', the TemplateString evaluates to 'Hello I am Bill Rogers.'
You can 'nest' these evaluations, so that the dataset name, variable name, or index is formed from the value of variables using ParamSpec. For example, suppose that <setname> contains 'myNVSetName', <varName> contains 'myVarName', and <index> contains '2'. The following ParamSpecs is then equivalent to:
<{<setName>}<varName>[<index>]>
<{myNVSetName}myVarName[2]>
The guardeval and commandeval packages also provide features to:
-
Define boolean conditions.
-
Get, set, and manipulate values.
-
Branch and loop.
-
Create procedures, mapping tables, and commands.
For more details, refer to the component documentation for these packages.