When you create a visual program with the graphical user interface, Data Explorer saves the program in a .net file. This saved version is actually a set of scripting-language commands. You do not need to understand the script language unless you are running Data Explorer in script mode.
In Data Explorer script mode you can also perform tasks that would be awkward with a visual program (e.g., facilitation of batch processing or debugging of a module).
To run Data Explorer in script mode on a workstation, you must have an account on that workstation.
To start Data Explorer, follow these steps:
dx -scriptWhen script mode starts, you will see a prompt symbol (dx>), indicating that Data Explorer is ready to accept input. (If you want to change the prompt symbol, see 10.7 , "Using Data Explorer Script Commands".)
(All of the command line options for Data Explorer are described in C.2 , "Command Line Options".)
You can type commands directly at the command line, but you may find it more convenient to create a script and submit it to Data Explorer for execution. To submit a script, type:
include "scriptname"at the prompt, where scriptname is the name of the script.
Once you have submitted a script, Data Explorer will process the commands it contains. Note that none of the direct interactor options are available in script mode: you must use the Image tool in the graphical user interface to take advantage of those options.
After the included script has been processed, you can include another script. To terminate your Data Explorer session, type:
You can also include a script name directly in the script command: add the name of the script after the -script option. Data Explorer will terminate automatically when it has executed the script. For example, type:
include "/usr/lpp/dx/samples/scripts/scriptexample"You will see a sequence of images created with sequencer commands. The directory /usr/lpp/dx/samples/scripts contains examples for many modules. You may find it helpful to experiment with them to learn how they function.
Note: To ensure that an example program does not exit before you want it to, invoke script mode first and then "include" the program. Otherwise, some programs will execute and disappear so quickly that you won't be able to identify the image.
There are several environment variables that you may find useful to customize Data Explorer. These can be set in your login profile.
The DXDATA environment variable specifies a list of directories in which Data Explorer will search for data files. If the data you wish to import is in one of the directories specified in the DXDATA environment variable, you do not need to provide the complete path name to the Import tool. Specify the file name, and the Import module will look in the specified directories for the data file. The directories will be searched in the order in which they are listed in the environment variable; and the first occurrence of the data file will be used.
An example of a statement that sets the DXDATA environment variable (in the C shell environment) is the following:
setenv DXDATA /usr/mydirectory/mydata:/usr/group/groupdatawhere /usr/mydirectory/mydata and /usr/group/groupdata are two directories that contain data files. Multiple directories can be listed, with each directory name separated by a colon.
The DXHOST environment variable is the initial machine name of the server on which to run the executive. If DXHOST is not specified, then a default of "localhost" is used. See 9.3 , "Connecting to the Server" for more information on how to connect to the server. The host name should be the name that results when you issue the uname -n shell command.
If this environment variable is set, Data Explorer looks for included scripts first in the current directory, and then in each of the directories specified in the colon-separated list specified by this variable.
The DXMACROS environment variable is a list of the directories in which Data Explorer will look for macros.
[Data Explorer Home Page | Contact Data Explorer | Same document on Data Explorer Home Page ]