-> (Dynamic Rename)

Renames a component of the set specification in the main command.

A set specification can consist of one or more components. When you create a result set, the structure of that set reflects the component names or role names found in the original set specification.

To use a result, set in a subsequent command and have a component of the set used in a different role, -> (dynamic rename) enables you to rename the component in question.

Syntax

objname (oldcomponentname -> newcomponentname)

where

objname

The name of a set, an EntitySet, a relationship, or a role. There must be at least one component in objname.

oldcomponentname

The existing name of a component in objname.

newcomponentname

The new name to be given to the specified component of objname.

Comments

When creating a result set, the structure of that set reflects the component names or role names found in the original set specification.

If you want to use the result set in a subsequent command, and you want a component of the set to be used in a different role, dynamic rename (->) enables you to rename the component.

The indicator renames a component of the set specification in the main command.

Oldcomponentname and newcomponentname must both refer to the same underlying object.

Examples

If EntitySet Employees also has a role called Managers, dynamic renaming can be used as shown in the following two examples.

find Employees WorkFor Managers where LName = Smith \
       keep Employees -> set1
find Employees WorkFor set1 (Employees -> Managers) \
       keep Employees -> set1

In the second command, the usage of the only component of set1 is dynamically changed from Employees to Managers.

find Managers -> MSet
while
 find MSet (Managers -> Employees) WorkFor Managers keep Managers
 if $setcount > 0
  find -> MSet
 else
  break
 endif
endwhile
list all MSet

In a loop, each usage of the Managers component of MSet is dynamically renamed to Employees to select the top managers from an EntitySet of employees.