DIAL Command Line Arguments

DIAL 7.1(15) introduced support for command line arguments as part of the DIAL server mode. These can be used to simplify some DIAL scripts in an automated environment. A script can skip the DiveLine connection procedure calls, and the DiveLine connection settings can be passed in on the command line.

Command Description

--version

-v

Prints the version string and exits. For example: Query DIAL Version
--debug

Turns on debugging (debug.set(true)).

See Debug Functions in DIAL.

--dataroot

Sets the data root (calls diveline.set_webdir(...)).

For example:

--dataroot D:\DI\Solution\dl-dataroot

--server

--user

--password

These connection settings work as follows:

  • If dataroot is set, then diveline.set_webdir(dataroot + "/webdir").

  • If server, user, and dataroot are set, then diveline.connect(server, user).

  • If server, user, and password are set, but not dataroot, then diveline.connect(server, user, password).

  • If project is set, then diveline.set_project(project).

See DiveLine Functions in DIAL.

For example:

--server localhost:2130 --dataroot D:\DI\Solution\dl-dataroot --user jenny --project MYdata

--project

Sets the project (diveline.set_project(...)).

See DiveLine Functions in DIAL.

For example:

--project Main_Ops

-- Ends the DIAL arguments (in case the script path starts with '-').
--auto-local-mode

Tells DIAL to enable behavior based on the script. Set by Workbench.

When the server is set to "strict" mode, DIAL scripts are always run in "server mode". But when it is "casual" then whether DIAL is in local or server mode depends on the content of the script. See User Management.

--refdir

Indicates the reference directory. Set by Workbench.

Used to set up the context for server mode. It specifies the working directory of the script, so that relative paths can be resolved from that project path.

Basic usage syntax:

java -jar <path to dial.jar> --server <diveline server name:port> --user <user> --password <password> --project <project name> <script name>.dial

Examples:

Running from the command prompt root:

c:\>java -jar c:\di_solution_71\executables\dial.jar --server ginny:7100 --user admin --password admin --project BugsData DI_Projects\BugsData\programs\45338\dimcount.dial

Running from the script's location:

C:\DI_Projects\BugsData\programs\45338>java -jar C:\DI_Solution_71\executables\dial.jar --server ginny:7100 --user admin --password admin --project BugsData dimcount.dial