Sets: From
You must use the @ symbol as a prefix for set names used in the query.
*The MetaClass preceding the From operator is optional: a set having been defined for a MetaClass, this MetaClass is used by default.
You can save the result returned by a query as a set. You can use this result in other queries for the duration of your query session. Sets will restrict your query, which can be useful in optimizing response times, executing lengthy queries only once.
Only saved sets can be used by other queries (except sets used in queries containing several Select clauses; see their description below).
Example:
The following query searches for messages of a diagram that satisfy a condition ("Where" operator) in the set of messages “Mod_Messages”.
select Message from @Mod_Messages where Condition
Sets are kept and named using the Keep command of which syntax is keep @set.
You can delete sets with the Delete command. The sets are also deleted when you close your work session.
Example:
select Org-Unit into @MainOrg-Units where not Aggregation-Of
keep @MainOrg-Units
In this query, you build and keep the set of main org-units, that is org-units not aggregated in any other org-unit.
In the next query, you will reuse this set and delete it when you no longer need it.
select Org-Unit from @MainOrg-Units where Diagram.Project = &Project
delete @MainOrg-Units
This provides you with the list of the main org-units for the project specified by the project setting.