User's Reference - Executive

### Executive

Category

Interface Control

Function

Executes an executive command.

Syntax

    Executive(command, value);

Inputs

Name | Type | Default | Description
--- | --- | --- | ---
`command` | string | none | command to be executed
`value` | object | no default | command-dependent value

Functional Details

This module tells the Data Explorer executive to run an internal system command. In the user interface, it is available only through the `Execute Script Command` option of the `Options` pull-down menu of the Message window. And with the exception of the "print" command, it should be invoked only through the scripting language.

`command` | is the executive command to be executed.
`value` | is a `command`-dependent value.

The types of commands executed by the Executive module fall into four categories:

- printing system information
- distributed processing
- module definition
- system functions.

##### Printing System Information

The following list summarizes the kinds of system information available with the "print" command.

- Version information for Data Explorer:

      Executive("print version");

- Information about the system environment:

      Executive("print env");

- A module definition:

      Executive("print mdf","modulename");

- A list of the execution groups:

      Executive("print groups");

- A list of the attached hosts:

      Executive("print hosts");

##### Distributed Processing in Script Language

Use the following commands to control distributed processing in the script language. (In the user interface, distributed processing should be controlled through the `Execution Group Assignment...` option of the `Connections` pull-down menu in the VPE window. See 9.1 , "Using Distributed Computation" in IBM Visualization Data Explorer User's Guide.)

- To attach an execution group to a host requires the name of the host machine and any options to be used when Data Explorer is started on that host. Data Explorer establishes communication with the named host via a TCP/IP socket connection. The syntax for attachment is:

      Executive("group attach",  "group1:hostname -dxopt1 -dxopt2 ...");
      $sync

  or

      Executive("group attach", { "group1:hostname -dxopt1 -dxopt2 ...",
                                  "group2:hostname -dxopt1 -dxopt2 ...",
                                  "group3:hostname -dxopt1 -dxopt2 ...", ...});
      $sync

- Detaching an execution group from a host requires only the group's name in the command:

      Executive("group detach", "group1");
      $sync

  or

      Executive("group detach", { "group1", "group2", ... });
      $sync

- The "host disconnect" command terminates the connection to a host:

      Executive("host disconnect", "hostname1");
      $sync

  or

      Executive("host disconnect", { "hostname1", "hostname2", ... });
      $sync

Note: These Executive calls must be followed by `$sync`, as shown.

##### Module Definition

To load the module definition file (mdf) of an outboard module after Data Explorer has been started, use the script syntax shown here. (In the user interface, use the `Load Module Description(s)...` option of the `File` pull-down menu in the VPE or Image window.)

    Executive("mdf file", "mdf_filename");
    $sync

Note: The call to load the mdf file must be followed by `$sync`, as shown.

##### UserInteractor Definition

To load a UserInteractor after Data Explorer has been started, use the following script syntax:

    Executive("loadinteractors", "userinteractor_filename");
    $sync

Note: In the User Interface this can be done using the `Execute Script Command` option in the `Commands` menu of the Message Window.

##### System Functions

The following commands execute system functions:

- To flush all variables in the internal cache:

      Executive("flush cache");

- To flush all variables in the system dictionary:

      Executive("flush dictionary");

- To flush all macro definitions from the system:

      Executive("flush macros");

Example

In this example, the execution groups "mine" and "yours" are attached to hosts "ours" and "theirs" respectively. Also, Data Explorer is started with a memory allocation of 50MB on the host "theirs."

    Executive("group attach",{"mine:ours","yours:theirs -memory 50"});

[ OpenDX Home at IBM | OpenDX.org ]